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.
Creem makes it incredibly simple to grant and revoke access based on subscription status. Instead of manually handling multiple webhook events, you can use the high-level onGrantAccess and onRevokeAccess callbacks that automatically fire at the right times in your subscription lifecycle.
onGrantAccess - Automatically called when a customer should have access (when subscription is active, trialing, or paid)
onRevokeAccess - Automatically called when a customer should lose access (when subscription is paused or expired)
This abstraction means you don’t need to track individual subscription events. Just implement these two callbacks to handle your entire access management flow.
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.