Base URL
All API requests are made to the following base URLs:- Production
- Test Mode
Authentication
All API requests must include your API key in thex-api-key header.
Test Mode
Test mode gives you a full sandbox environment to build and test your integration without processing real payments.| Production | Test Mode | |
|---|---|---|
| Base URL | https://api.creem.io/v1 | https://test-api.creem.io/v1 |
| API Keys | Found in dashboard (production mode) | Found in dashboard (test mode toggle) |
| Payments | Real charges | Simulated with test cards |
| Data | Live data | Isolated sandbox data |
Test Cards
Use these card numbers to simulate different payment scenarios. All cards work with any future expiration date, any CVV, and any billing information.| Card Number | Behavior |
|---|---|
4242 4242 4242 4242 | Successful payment |
4000 0000 0000 0002 | Card declined |
4000 0000 0000 9995 | Insufficient funds |
4000 0000 0000 0127 | Incorrect CVC |
4000 0000 0000 0069 | Expired card |
Using Test Mode in Code
Webhooks
Creem sends real-time event notifications to your server via webhooks. Webhook payloads are signed using HMAC-SHA256 so you can verify their authenticity. Signature verification: Every webhook request includes acreem-signature header. Verify it using your webhook secret (found in Developers > Webhook) and the HMAC-SHA256 algorithm:
| Event | Description |
|---|---|
checkout.completed | A checkout session was completed |
subscription.active | A new subscription was created |
subscription.paid | A subscription payment was collected |
subscription.canceled | A subscription was canceled |
subscription.scheduled_cancel | A subscription is scheduled for cancellation at period end |
subscription.past_due | A subscription payment failed |
subscription.expired | A subscription period ended without payment |
subscription.trialing | A subscription started a trial |
subscription.paused | A subscription was paused |
subscription.update | A subscription was updated |
refund.created | A refund was issued |
dispute.created | A dispute was opened by a customer |
Full Webhooks Guide
Detailed setup instructions, signature verification, and event payload examples.
Response Codes
| Status | Description |
|---|---|
200 | Successful request |
400 | Invalid parameters or validation error |
401 | Missing API key |
403 | Invalid API key or insufficient permissions |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |
trace_id you can share with support for faster debugging. See Error Handling for details.
SDKs & Libraries
TypeScript SDK
Core SDK for Node.js and TypeScript projects
Next.js Adapter
Drop-in checkout and webhook helpers for Next.js
Better Auth Plugin
Integrate Creem billing with Better Auth
CLI
Manage products and checkouts from the terminal