Checkout Intents
Purchase product
Create a checkout intent and immediately trigger the purchase workflow.
This is a "fire-and-forget" endpoint that combines create + confirm in one step. The workflow handles offer retrieval, payment authorization, and order placement asynchronously. Poll the GET endpoint to check status.
post/api/v1/checkout-intents/purchase
Request body
Example request
{
"referenceId": "order-1234",
"constraints": {
"maxShippingPrice": 500,
"maxTotalPrice": 100000
},
"promoCodes": [
"SAVE20"
],
"variantSelections": [
{
"label": "Size, Color, etc."
}
],
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address2": "Apt 1",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John"
},
"quantity": 1,
"productUrl": "https://www.amazon.com/dp/B0DFC9MT8Q",
"paymentMethod": {
"stripeToken": "tok_1RkrWWHGDlstla3f1Fc7ZrhH",
"type": "stripe_token"
}
}Response
Created
Example response
{
"referenceId": "order-1234",
"constraints": {
"maxShippingPrice": 500,
"maxTotalPrice": 100000
},
"promoCodes": [
"SAVE20"
],
"variantSelections": [
{
"label": "Size, Color, etc."
}
],
"buyer": {
"postalCode": "10001",
"country": "US",
"province": "NY",
"city": "New York",
"address2": "Apt 1",
"address1": "123 Main St",
"phone": "1234567890",
"email": "john.doe@example.com",
"lastName": "Doe",
"firstName": "John"
}
}