Create Checkout Token
POST /stores/{store_hash}/v3/checkouts/{checkoutId}/token
Request
Use the checkout token to display a confirmation page for a guest shopper.
Usage Notes * The response from performing this POST request is a checkout token. * The checkout token is a single-use token that is not order-dependent. You cannot create this token after finalizing an order. * After completing the order, you can redirect the shopper to /order-confirmation/{orderId}?t={checkoutToken}. * After token validation, the /order-confirmation/{orderId} page displays. * The ORDER_TOKEN
should match the order or the logged-in customer can access the order.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
maxUsesnumber
Example: 1
ttlnumber
Time-to-live (TTL) is the number of seconds the token is set to exist before being discarded.
Example: 86400
example-1
{ "maxUses": 1, "ttl": 2 }
Response
OK
Body
checkoutTokenstring
Example: beb3590088be88f59ba980d54a68df655cd8a1052a3e9caf535f3f820146c226
metaobject
Response metadata.
example-1
{ "data": { "checkoutToken": "beb3590088be88f59ba980d54a68df655cd8a1052a3e9caf535f3f820146c226", "meta": {} } }