Create Session
Create a new payment configuration for a product. Returns redirect URLs pointing to the custom checkout layout.
Body
The public product identifier (product ID)
"prod_XXXXXXXXXXX"
Three-letter ISO currency code (lowercase)
"usd"
The quantity of items to buy
1
Discount code to apply
"PROMO10"
Custom price paid by customer (for Pay What You Want products)
15
Email address of the customer
"customer@example.com"
JSON metadata or checkout custom information
Custom text fields required for the purchase
Affiliate partner tracking code
"partner_abc"
The existing checkout database ID to validate / update
"019e56ba-9832-72ae-XXXXXXXXXXX"
Response
Checkout session configuration created successfully.
The unique identifier for the checkout session in database
"019e56ba-9832-72ae-XXXXXXXXXXX"
The unique session ID format for external clients
"ch_XXXXXXXXXXXXXX"
The public redirect URL to the custom payment steps page
"http://localhost:3000/checkout/test/prod_XXXXXXXXXXX?checkout_id=019e56ba-9832-72ae-XXXXXXXXXX"