For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
            • GETGet Checkout
            • PUTUpdate Customer Messages
              • POSTCreate Checkout Token
        • Currencies
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminManagementCheckoutsToken

Create Checkout Token

POST
https://api.bigcommerce.com/stores/:store_hash/v3/checkouts/:checkoutId/token
POST
/stores/:store_hash/v3/checkouts/:checkoutId/token
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/checkouts/checkoutId/token \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "maxUses": 1,
> "ttl": 3600
>}'
1{
2 "data": {
3 "checkoutToken": "a3f5c9d8e7b4f1a2c3d6e8f9b0a1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9",
4 "meta": {}
5 }
6}
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.
Was this page helpful?
Previous

Update Channel-Specific Checkout Settings

Next

Currencies

Built with

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-fundamentals/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-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/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

ID of the checkout; the same as the cart ID.

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

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

OAuth scopes

UI NamePermissionParameter
Checkoutsmodifystore_checkouts
Checkoutsread-onlystore_checkouts_read_only
Checkout Contentmodifystore_checkout_content
Checkout Contentread-onlystore_checkout_content_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.