POST
/
v1
/
checkouts

Headers

x-api-key
string
required

Body

application/json
product_id
string
required

The ID of the product associated with the checkout session.

request_id
string

Identify and track each checkout request.

discount_code
string

Prefill the checkout session with a discount code.

customer
object

Customer data for checkout session. This will prefill the customer info on the checkout page

custom_field
object[]

Collect additional information from your customer using custom fields. Up to 3 fields are supported.

success_url
string

The URL to which the user will be redirected after the checkout process is completed.

metadata
object[]

A key-value pair where the key is a string, and the value can be a string, number, or null. This metadata will be propagated across all related objects, such as subscriptions and customers.

Response

200 - application/json
id
string
required

Unique identifier for the object.

mode
enum<string>
required

String representing the environment.

Available options:
test,
live,
sandbox
object
string
required

String representing the object’s type. Objects of the same type share the same value.

status
string
required

Status of the checkout.

product
object
required

The product associated with the checkout session.

checkout_url
string
required

The URL to which the customer will be redirected to complete the payment.

success_url
string
required

The URL to which the user will be redirected after the checkout process is completed.

request_id
string

Identify and track each checkout request.

order
object

The order associated with the checkout session.

subscription
object

The subscription associated with the checkout session.

customer
object

The customer associated with the checkout session.

custom_fields
object[]

Additional information collected from your customer during the checkout process.

metadata
object[]

A key-value pair where the key is a string, and the value can be a string, number, or null.