Add a payment method
Add a payment method to a shopper's Bolt Account Wallet. For security purposes, this request must come from your backend. Note: Before using this API, the credit card details must be tokenized by Bolt's credit card tokenization service. Please review our Bolt Payment Field Component or Install the Bolt Tokenizer documentation.
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/account/payment-methods" \ -H "X-Publishable-Key: string" \ -H "Content-Type: application/json" \ -d '{ ".tag": "credit_card", "type": "credit", "network": "visa", "bin": "411111", "last4": "1004", "expiration": "2025-03", "token": "a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0", "billing_address": { ".tag": "id", "id": "D4g3h5tBuVYK9" } }'{ ".tag": "credit_card", "id": "X5h6j8uLpVGK", "type": "credit_card", "billing_address": { ".tag": "id", "id": "D4g3h5tBuVYK9" }, "network": "visa", "bin": "411111", "last4": "1004", "expiration": "2029-03", "token": "a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0", "affirm_vcn_token": "a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0", "default": true}Edit an existing address PUT
Edit an existing address on the shopper's account. This does not edit addresses that are already associated with other resources, such as transactions or shipments.
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.