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
- Log in to the Merchant Dashboard.
- Navigate to Developers > API.
- Scroll to Keys and reveal your API Key.
- 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.
|X-Api-Key||Provide the API_KEY|
|X-Nonce||unique 12-16 digit for every request (UUID is a good option)|
|Environment||Bolt API URLs|
2. Make a Create Order Request
1. Call Order Endpoint
See the Official API Reference for a request example.
2. Validate the Response
Check for a
HTTP 200 success code and that the response contains an order token.
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
tax_amountmust be in cents
- Every item must have an
(quantity X unit_price) + tax_amount
- Every cent must be precisely accounted for