Add Payment Method
POST {{api_base_url}}/v1/account/payment_methods
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 API key.
Required Variables
oauthaccesstoken:
An active OAuth access token. Obtain an access token from the Authorization Code Request under the OAuth folder. You will need a shopper's Authorization Code to receive this token.
Testing: For testing purposes, the Create Test Shopper Account request will provide a mechanism to get this value. (Only in Sandbox)
shopperemail & shopperphone:
The email and phone attached to the billing address in the shopper's address book.
creditcardtoken:
An active credit card token for the payment method being attached to the shopper's account.
Testing: For testing purposes, the Create a Test Credit Card Token request will provide a mechanism to get these values. (Only in Sandbox)
The required variables are the minimum initial values necessary to get a request working. It is expected that you will add/modify more parameters throughout the integration process.
Request Body
{"billing_address"=>{"company"=>"Bolt", "country"=>"United States", "country_code"=>"US", "default"=>true, "email"=>"{{shopper_email}}", "first_name"=>"Alan", "last_name"=>"Watts", "locality"=>"Brooklyn", "name"=>"Alan Watts", "phone"=>"{{shopper_phone}}", "postal_code"=>"10044", "region"=>"NY", "region_code"=>"NY", "street_address1"=>"888 main street", "street_address2"=>"apt 3021"}, "bin"=>"411111", "expiration"=>"2025-11", "last4"=>"1234", "postal_code"=>"10044", "network"=>"visa", "token"=>"{{credit_card_token}}", "token_type"=>"bolt", "default"=>true}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-API-Key | string | Bolt Account API Key | |
X-Publishable-Key | string | Bolt Account Publishable Key | |
Authorization | string | Auth token form shopper OAuth |