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 theX-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.
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.Next
Passtoken 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.