Add Payment Method
Add a payment method to a shopper’s Bolt account Wallet. For security purposes, this request must come from your backend because authentication requires the use of your private key.
Note: Before using this API, the credit card details must be tokenized using Bolt’s JavaScript library function, which is documented in Install the Bolt Tokenizer.
Authorizations
Bolt utilizes the OAuth flow that developers can use to attain access to Bolt Account data via APIs.
For all APIs that require authorization, please provide your access_token returned from /v1/oauth/token via the basic auth bearer header Authorization: bearer ${TOKEN}.
Read more about the OAuth token endpoint.
Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard.
Headers
The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard [RECOMMENDED].
A key created by merchants that ensures POST and PATCH requests are only performed once. Read more about Idempotent Requests here.
Body
The credit_card object is used to to pay for guest checkout transactions or save payment method details to an account. Once saved, you can reference the credit card with the associated credit_card_id for future transactions.
The Address object is used for billing, shipping, and physical store address use cases.
The expiration date of the credit card.
"2025-11"
The Bolt token associated to the credit card.
"a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0"
The unique Bolt ID associated with a saved shopper address. This can be obtained by accessing a shopper's account details. If you use this field, you do not need to use billing_address.
null
The Bank Identification Number for the credit card. This is typically the first 4-6 digits of the credit card number.
4 - 6411111
The last 4 digits of the credit card number.
4"1234"
A key-value pair object that allows users to store arbitrary information associated with an object. For any individual account object, we allow up to 50 keys. Keys can be up to 40 characters long and values can be up to 500 characters long. Metadata should not contain any sensitive customer information, like PII (Personally Identifiable Information). For more information about metadata, see our documentation.
{ "customer_id": 234 }visa, mastercard, amex, discover, dinersclub, jcb, unionpay, alliancedata, citiplcc, unknown Used to provide ApplePay DPAN or private label credit card PAN when applicable. Required when charging a private label credit card.
Used for the postal or zip code associated with the credit card.
32"10044"
Used to indicate the card's priority. '1' indicates primary, while '2' indicates a secondary card.
1, 2 Determines whether or not the credit card will be saved to the shopper's account. Defaults to true.
Used to define which payment processor generated the token for this credit card. For those using Bolt's tokenizer, the value must be bolt.
vantiv, applepay, bolt, stripe, plcc "bolt"
This can be left empty. A 3-digit ISO code for currency that will be used in the credit card authorization.
"USD"
Response
Payment Method Added
Saved Credit Card Detail
The address object returned in the response.
The ID of the payment method associated with the Shopper's account.
The card's last 4 digits. Nullable for Transactions Details.
4"4021"
The expiration month of the credit card.
11
The expiration year of the credit card.
2024
The card's network code. Nullable for Transactions Details. Note: LEGACY diners_club_us_ca now tagged as mastercard
visa, mastercard, amex, discover, dinersclub, jcb, unionpay, alliancedata, citiplcc, unknown "visa"
The default card payment method chosen by the shopper.
The payment method type. If empty, the property defaults to card.
card, paypal The APM account identifier; usually the email address.
A key-value pair object that allows users to store arbitrary information associated with an object. For any individual account object, we allow up to 50 keys. Keys can be up to 40 characters long and values can be up to 500 characters long. Metadata should not contain any sensitive customer information, like PII (Personally Identifiable Information). For more information about metadata, see our documentation.
{ "customer_id": 234 }