Skip to main content
Deprecation Notice: The creem_io wrapper package is deprecated. Existing integrations will continue to work, but new integrations should use the TypeScript SDK (creem). To update an existing integration, follow the migration guide.
This page is kept as a reference for existing creem_io integrations.

Migrate to the creem SDK

Replace creem_io imports, update API calls, and move webhook handling to the typed creem SDK helpers.

Overview

The deprecated creem_io package is a convenience wrapper around the Creem API that provides:
  • Simplified webhook handling with onGrantAccess and onRevokeAccess callbacks
  • Automatic signature verification for webhook events
  • Type-safe event handlers for all webhook events
  • Framework-agnostic webhook processing
For new projects, use the TypeScript SDK (creem), which is the recommended SDK with full API coverage and active support.

Installation

For existing creem_io integrations, install with your preferred package manager:

Quick Start


Environment Variables

We recommend storing your credentials in environment variables:

API Resources

The SDK organizes all operations into logical resources:

Products

Checkouts

Customers

Subscriptions

Update Behavior Options: - proration-charge-immediately: Calculate proration and charge immediately - proration-charge: Calculate proration and charge at next billing cycle - proration-none: No proration, just switch the plan

Licenses

Discounts

Transactions


Webhooks

Handle Creem webhook events in your application. The SDK provides automatic signature verification and type-safe event handlers.

Basic Webhook Setup

Access Management Callbacks

The onGrantAccess and onRevokeAccess callbacks simplify subscription access management:

All Available Webhook Events

Framework-Specific Examples


TypeScript Support

The SDK is written in TypeScript and provides comprehensive type definitions:
All API responses are fully typed, and the SDK automatically converts snake_case to camelCase for better TypeScript/JavaScript experience.

Error Handling

The SDK throws errors when API calls fail. Always wrap SDK calls in try-catch blocks:

References


For feedback or issues, open a PR or issue on the Creem SDK GitHub.