POST

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

X-API-Key
string
header
required

Headers

X-Publishable-Key
string
required

The publicly shareable identifier used to identify your Bolt merchant division.

X-Merchant-Client-Id
string

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.

Body

application/json
.tag
enum<string>
required
Available options:
credit_card
Example:

"credit_card"

type
string
required

The type of payment method

Example:

"credit_card"

billing_address
Address ID Reference · object
required
network
enum<string>
required

The credit card's network.

Available options:
visa,
mastercard,
amex,
discover,
jcb,
dinersclub,
unionpay,
alliancedata,
citiplcc
Example:

"visa"

bin
string
required

The Bank Identification Number (BIN). This is the first 4 to 8 digits of the account number.

Pattern: ^\d+$
Example:

"411111"

last4
string
required

The account number's last four digits.

Pattern: ^\d{4}$
Example:

"1004"

expiration
string
required

The expiration date, in YYYY-MM format.

Pattern: ^\d{4}-\d{2}$
Example:

"2029-03"

token
string
required
write-only

The Bolt token associated with the credit card.

Example:

"a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0"

affirm_vcn_token
string

The checkout token associated with Affirm VCN credit cards.

Example:

"a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0"

default
boolean

Indicates whether this credit card is the default payment method.

Example:

true

Response

The payment method was successfully added

.tag
enum<string>
required
Available options:
credit_card
Example:

"credit_card"

type
string
required

The type of payment method

Example:

"credit_card"

billing_address
Address ID Reference · object
required
network
enum<string>
required

The credit card's network.

Available options:
visa,
mastercard,
amex,
discover,
jcb,
dinersclub,
unionpay,
alliancedata,
citiplcc
Example:

"visa"

bin
string
required

The Bank Identification Number (BIN). This is the first 4 to 8 digits of the account number.

Pattern: ^\d+$
Example:

"411111"

last4
string
required

The account number's last four digits.

Pattern: ^\d{4}$
Example:

"1004"

expiration
string
required

The expiration date, in YYYY-MM format.

Pattern: ^\d{4}-\d{2}$
Example:

"2029-03"

id
string<id>
read-only
Example:

"X5h6j8uLpVGK"

affirm_vcn_token
string

The checkout token associated with Affirm VCN credit cards.

Example:

"a1B2c3D4e5F6G7H8i9J0k1L2m3N4o5P6Q7r8S9t0"

default
boolean

Indicates whether this credit card is the default payment method.

Example:

true