Create recurring payment plans for your products and services with flexible billing cycles and subscription management.
Subscriptions in Creem allow you to create recurring payment agreements with your customers. When a customer subscribes to your product, they agree to be billed periodically (monthly, yearly, etc.) until they cancel their subscription.
A subscription represents a recurring payment agreement between you and your customer. Subscriptions automatically handle billing cycles, payment retries, and customer management.To help you understand the various subscription lifecycle scenarios, including relevant states and the webhook events triggered at each stage, see the diagrams below:
A subscription can be in different states throughout its lifecycle:
Active: The subscription is current and payments are being processed normally.
Canceled: The subscription has been terminated and will not renew or bill again.
Unpaid: Payment for the subscription has failed or is overdue; access may be restricted until payment is made.
Incomplete: Customer must complete payment within 23 hours to activate, or payment requires action (e.g., authentication). Also applies to pending payments with processing status.
Paused: The subscription is temporarily paused (no charges are processed and billing is on hold).
Trialing: The subscription is in a trial period before the first payment is collected.
Scheduled Cancel: The subscription is scheduled to cancel at the end of the current billing period but is still active until then.
The ID of the checkout session created for this subscription.
subscription_id
The ID of the subscription created.
customer_id
The customer ID associated with this subscription.
product_id
The product ID that the subscription is for.
request_id
Optional. The request/reference ID you provided when creating this checkout.
signature
All previous parameters signed by Creem using your API-key, verifiable by you.
See Verifying Redirect Signatures
for code examples on how to validate the signature. Remember that null values (like order_id for
subscription checkouts) are excluded from the signature string.
For production applications, we recommend using Webhooks to handle subscription
events like renewals, cancellations, and payment failures.
Use webhooks to grant and revoke access based on subscription status. The Next.js and Better Auth adapters provide high-level onGrantAccess and onRevokeAccess callbacks. With the TypeScript SDK, verify the webhook payload and handle the subscription event types directly.
Grant access when subscription events indicate the customer should have access, such as subscription.active, subscription.trialing, or subscription.paid.
Revoke access when subscription events indicate the customer should lose access, such as subscription.paused or subscription.expired.
The adapters can group these events into callbacks for you. In a generic TypeScript endpoint, keep the event mapping explicit so your application owns the access policy.
View all webhook events and learn about signature verification.
If you want to remove access when your customer cancels the subscription (even though the billing
period might still be active), you should listen to the subscription.canceled event.