Bolt Checkout will not open without an order token. You create one by sending your cart to POST /v1/merchant/orders, then hand the returned token to the checkout modal. This is the first piece of a custom cart integration and the only one that runs before the shopper sees anything.

Request

Authenticate with your API key in the X-API-Key header. Amounts are integers in the currency’s minor units, so 41200 is $412.00.
TypeScript
total_amount on the cart is the amount the shopper will be charged, including tax and shipping. Bolt does not derive it from the items, so it must already account for tax_amount and any shipment costs you send.

Required fields

Everything not listed here is optional. Two fields are commonly described as required but are not: description and image_url. Omitting them is valid, and omitting image_url is the simplest way to work around the restriction below during local development. channel records where the order originated, either browser or mobile_app. Send it on every request so your transaction reporting attributes orders correctly.
Every URL in the cart, including image_url, must be resolvable from the public internet. A cart pointing at localhost is rejected at the edge before it reaches the API, and the response is an HTML error page rather than JSON, so clients that expect JSON fail with a parse error instead of a Bolt error code. In local development, either omit image_url or serve images through a tunnel.

Response

The token is what you need. cart echoes back what Bolt stored.
The response is not the request. Amounts you sent as integers come back as objects of amount, currency, and currency_symbol, and the currency string comes back as an object too. A single type reused for both directions will fail to deserialize the response.
The same split applies to the Merchant Callback events, where which form you receive depends on the event. See Merchant Callback conventions.

Next

Pass token to the checkout modal, then build the Merchant Callback API that Bolt calls during checkout for shipping, tax, discounts, and order creation. Start with Merchant Callback conventions, which covers the rules shared by every event.