Creating a Checkout Session
Learn how to programmatically create checkout sessions for your products using Creem’s APIs and SDKs.Video Tutorial
What is a Checkout Session?
A checkout session is a dynamically generated payment page that gives you programmatic control over the payment flow. Unlike static payment links, checkout sessions allow you to:- Pass custom tracking IDs for each payment
- Pre-fill customer information
- Set dynamic success URLs based on your app’s context
- Apply discount codes programmatically
- Add metadata for internal tracking
Prerequisites
Before you begin, make sure you have:- A Creem account with an API key
- At least one product created in your dashboard
- Your development environment set up
Quick Start
Choose your preferred integration method:Next.js
Use the Next.js adapter for seamless integration
TypeScript SDK
Full type-safety for any JavaScript framework
Better Auth
Integrate with authentication and user management
REST API
Use the REST API from any language
Common Use Cases
1. Pre-fill Customer Email
Ensure users complete payment with their registered email:2. Track Payments with Custom IDs
Associate payments with your internal system:3. Apply Discount Codes
Pre-fill discount codes for special offers:4. Seat-Based Billing
Charge for multiple units or seats:Next Steps
Checkout API Documentation
View the complete Checkout API reference
Webhooks
Set up webhooks to receive real-time payment notifications
Test Your Integration
Learn how to test without processing real payments
Checkout Customization
Brand your checkout with custom colors and logos
Need Help?
Having trouble? Check out our complete Checkout API documentation or reach out to us at support@creem.io