Checkout from your siteReferenceHeadless checkout API
Create Checkout Session
POST
/storefront-public/v1/checkout-sessionsAuthorization
bearer AuthorizationBearer <token>
In: header
Header Parameters
idempotency-key?|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
items*array<>
Items
1 <= items <= 50email?|null
successUrl*string
Length
length <= 2048cancelUrl*string
Length
length <= 2048metadata?|null
visitorId?|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/storefront-public/v1/checkout-sessions" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "variantId": "string", "quantity": 1 } ], "successUrl": "string", "cancelUrl": "string" }'{ "id": "string", "url": "string", "expiresAt": "string", "totals": { "subtotal": { "amountMinorUnits": "string", "currency": "AED" } }}