Initialize a Bolt payment for logged in shoppers
Initialize a Bolt logged-in shopper's intent to pay for a cart, using the specified payment method. Payments must be finalized before indicating the payment result to the shopper. Some payment methods will finalize automatically after initialization. For these payments, they will transition directly to "finalized" and the response from Initialize Payment will contain a finalized payment.
Authorization
oauth bolt.account.manageapi-key In: header
Scope: bolt.account.manage
In: header
Header Parameters
The publicly shareable identifier used to identify your Bolt merchant division.
A unique identifier for a shopper's device, generated by Bolt. The value is retrieved with Bolt.state.merchantClientId in your frontend context, per-shopper. This header is required for proper attribution of this operation to your analytics reports. Omitting this header may result in incorrect statistics.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/payments" \ -H "X-Publishable-Key: string" \ -H "Content-Type: application/json" \ -d '{ "cart": { "total": { "units": 9000, "currency": "USD" }, "tax": { "units": 100, "currency": "USD" }, "order_reference": "order_100", "order_description": "Order #1234567890", "display_id": "215614191", "items": [ { "name": "Bolt Swag Bag", "reference": "item_100", "description": "Large tote with Bolt logo.", "total_amount": { "units": 9000, "currency": "USD" }, "unit_price": 1000, "quantity": 9, "image_url": "https://www.example.com/products/123456/images/1.png" } ], "shipments": [ { "cost": { "units": 10000, "currency": "USD" }, "carrier": "FedEx", "address": { ".tag": "id", "id": "D4g3h5tBuVYK9" } } ], "discounts": [ { "amount": { "units": 10000, "currency": "USD" }, "code": "SUMMER10DISCOUNT", "details_url": "https://www.example.com/SUMMER-SALE" } ] }, "payment_method": { ".tag": "id", "id": "X5h6j8uLpVGK" } }'{ ".tag": "finalized", "id": "iKv7t5bgt1gg", "status": "success", "transaction": { "reference": "OBYG-X1PX-FN55", "authorizations": [ { "processor_reference": "123456789XYZ" } ] }}Delete an existing payment method DELETE
Delete an existing payment method. Deleting a payment method does not invalidate or remove it from transactions or orders that are associated with it.
Finalize a pending payment POST
Finalize a pending payment being made by a Bolt logged-in shopper. Upon receipt of a finalized payment result, payment success should be communicated to the shopper.