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.

custom_field
object[]

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

customer
object

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

discount_code
string

Prefill the checkout session with a discount code.

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.

request_id
string

Identify and track each checkout request.

success_url
string

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

units
number

The number of units for the order.

Response

200 - application/json
checkout_url
string
required

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

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.

product
object
required

The product associated with the checkout session.

status
string
required

Status of the checkout.

success_url
string
required

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

custom_fields
object[]

Additional information collected from your customer during the checkout process.

customer
object

The customer associated with the checkout session.

metadata
object[]

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

order
object

The order associated with the checkout session.

request_id
string

Identify and track each checkout request.

subscription
object

The subscription associated with the checkout session.

units
number

The number of units for the of the product.