Create Checkout Token

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-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Checkouts | modify | `store_checkouts` | | Checkouts | read-only | `store_checkouts_read_only` | | Checkout Content | modify | `store_checkout_content` | | Checkout Content | read-only | `store_checkout_content_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

checkoutIdstringRequired

Request

This endpoint expects an object.
maxUsesdoubleOptional
ttldoubleOptional1-2592000

Time-to-live (TTL) is the number of seconds the token is set to exist before being discarded.

Response

OK
checkoutTokenstring
metaobject
Response metadata.

Errors

401
Unauthorized Error
422
Unprocessable Entity Error