Creem.io
A modern payment provider with a built-in affiliate system, enabling SaaS businesses to manage subscriptions, one-time payments, and referral programs in one place.
Demo
Setup
Add the following environment variables to your .env file:
Go to the Creem Dashboard → Developers → API & Webhooks in your Creem account.
Make sure you are on the Creem branch in your project. Create an api key with full permissions and paste it into:
Make sure you are using the Test mode for development. For production, switch to Live mode in Creem and repeat the same process.
Configure the webhook endpoint.
In the Creem Dashboard, go to Developers → API / Webhooks and add a new endpoint with your URL. For example: https://yourdomain/api/webhook
For local development, you can generate a temporary public URL using:
Use the generated URL as your webhook endpoint in Creem.
Enable the following webhook events:
checkout.completedsubscription.activesubscription.trialingsubscription.canceledsubscription.scheduled_cancelsubscription.paidsubscription.expiredsubscription.unpaidsubscription.updatesubscription.past_duesubscription.paused
After creating the webhook, copy the Signing Secret and paste it into:
Features
-
SaaSkit allows you to easily sell both onetime and subscription plans with beautifully designed pricing cards.
-
SaaSkit has built-in trial abuse prevention ensures users can only claim a trial once across all plans. Read more →
-
Users can upgrade or downgrade their subscriptions directly from within the app.
-
Downgrades are immediate and free:
Users are upgraded instantly. They are not charged for the downgraded plan for the remainder of the billing period.
-
Upgrades are immediate and prorated:
Users are upgraded instantly. They are charged the prorated difference for the remainder of the billing period.
-
You can sell one-time credit packs using one-time plans.
Usage
To create a one-time or subscription plan, simply add the configuration below to your plans.ts file.
All other attributes (besides the highlighted ones) are used for UI display purposes only.
Trial Abuse Prevention
Due to limitations in the Creem API, trial abuse prevention requires creating two separate products for each subscription plan:
- One product configured with a trial
- One product configured without a trial
When a user is eligible for a trial, the product with the trial is used. If the user has already consumed a trial (trial abuse prevention), the system automatically uses the product without a trial.
If you do not want to offer a trial for a specific plan, simply use the same productId for both:
productIdproductIdWithoutTrial
This ensures consistent behavior without requiring additional configuration.