Creating a Product Checkout Session
To create a checkout session for a single product, send aPOST request to /checkout/create.
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
productId | string | Yes | The product identifier. |
quantity | number | No | The quantity of items to buy (defaults to 1). |
discountCode | string | No | A discount code to apply to the checkout session. |
customPrice | number | No | The custom price paid by the customer (for Pay What You Want products). |
customerEmail | string | No | The email address of the customer to prefill. |
checkoutData | object | No | Custom JSON metadata or details associated with this session. |
customFields | object | No | Custom form field questions required for the purchase. |
aff | string | No | Affiliate partner tracking code. |
API Request Example
API Response
The endpoint returns exactly 3 fields:id: The internal database identifier for the checkout/payment configuration.session_id: The gateway session ID used to render the embedded component.checkout_url: The public redirect URL pointing to the custom hosted checkout page.
Creating a Collection Checkout Session
To create a checkout session for a product bundle/collection, send aPOST request to /checkout/collection/create.
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
collectionId | string | Yes | The database ID of the collection to bundle. |
quantity | number | No | Quantity of collections to buy (defaults to 1). |
discountCode | string | No | Discount code to apply. |
aff | string | No | Affiliate tracking code. |
API Request Example
cURL