Activating Test Mode
To switch to the test environment, click the Test Mode toggle at the bottom of the left sidebar.Using Test Mode in Code
When building your integration, you’ll need to configure your code to use Test Mode. Here’s how to do it across different SDKs:- Next.js
- TypeScript SDK
- Better Auth
- REST API
Use the For production, use an environment variable:
testMode parameter when creating checkouts:API Endpoints
Creem uses separate API endpoints for test and production environments:API Keys
Test and production environments use different API keys. You can find both keys in the Developers section. Make sure to toggle Test Mode in the bottom of the left sidebar.Testing Payments
Use these test card numbers to simulate different payment scenarios:All test card numbers work with any future expiration date, any CVV, and any billing information.
Webhook Testing
When in Test Mode, webhook events are sent to your test webhook URL. This allows you to:- Test your webhook endpoint locally using tools like ngrok
- Verify webhook signature validation
- Ensure your event handlers work correctly
Learn More About Webhooks
Set up webhooks to receive real-time payment notifications.
Switching to Production
When you’re ready to go live:1
Complete Testing
Verify all payment flows work correctly in Test Mode
2
Update API Keys
Replace test API keys with production API keys in your environment variables
3
Update API Endpoint
Ensure direct API calls use
https://api.creem.io. The TypeScript SDK uses production by
default when server is omitted.4
Configure Production Webhooks
Register your production webhook URL in the live dashboard
5
Create Production Products
Switch to production mode in the dashboard and create your live products
6
Monitor First Transactions
Watch your first few production transactions carefully to ensure everything works as expected
Next Steps
Checkout
Learn how to create checkout sessions and payment links
One-Time Payments
Accept single payments for products and services
Subscriptions
Set up recurring billing and subscription management
Webhooks
Set up webhooks to receive real-time payment notifications