Headers
Body
Create checkout request payload
The ID of the product associated with the checkout session.
"prod_1234567890"
Identify and track each checkout request.
The number of units for the order.
1
Prefill the checkout session with a discount code.
"SUMMER2024"
Customer data for checkout session. This will prefill the customer info on the checkout page
Collect additional information from your customer using custom fields. Up to 3 fields are supported.
The URL to which the user will be redirected after the checkout process is completed.
Metadata for the checkout in the form of key-value pairs
{
"userId": "user_123",
"visitCount": 42,
"lastVisit": "2023-04-01"
}
Response
Successfully created a checkout session
Unique identifier for the object.
String representing the environment.
test
, prod
, sandbox
String representing the object's type. Objects of the same type share the same value.
Status of the checkout.
pending
, processing
, completed
"completed"
The product associated with the checkout session.
Identify and track each checkout request.
The number of units for the of the product.
The order associated with the checkout session.
The subscription associated with the checkout session.
The customer associated with the checkout session.
Additional information collected from your customer during the checkout process.
The URL to which the customer will be redirected to complete the payment.
The URL to which the user will be redirected after the checkout process is completed.
"https://example.com/return"
Features issued for the order.
Metadata for the checkout in the form of key-value pairs
{
"userId": "user_123",
"visitCount": 42,
"lastVisit": "2023-04-01"
}