How to Create a Bolt Order Token

Create an order token to initiate the checkout process. This token is used to reference the cart generated in your storefront.

How to Set up the First Request

1. Configure Authorization & Headers

  1. Log in to the Merchant Dashboard.
  2. Navigate to Developers > API.
  3. Scroll to Keys and reveal your API Key.
  4. Embed this Publishable Key on your website.

The Signing Secret found in the Key section must also be used to authenticate payloads sent by Bolt.

Headers

HEADER VALUE
X-Api-Key Provide the API_KEY
X-Nonce unique 12-16 digit for every request (UUID is a good option)
Content-Type application/json

API URLs

Environment Bolt API URLs
Sandbox https://api-sandbox.bolt.com
Production https://api.bolt.com

2. Make a Create Order Request

1. Call Order Endpoint

See the Official API Reference for a request example.

2. Validate the Response

Request

Check for a HTTP 200 success code and that the response contains an order token.

Cart

Ensure that the order_reference value corresponds to the unique cart ID value provided in the request and that the cart_url matches as well.

Items & Totals

Ensure the following for each item and its values:

  • Items listed in the response must match the items listed in the request
  • The unit_price, total_amount and tax_amount must be in cents
  • Every item must have an image_url, name, and description
  • The total_amount must equal (quantity X unit_price) + tax_amount
  • Every cent must be precisely accounted for
👎

How did we do?

📖On This Page