Stored Instruments API (Beta) - Payments Server Operations
The Stored Instruments API gives shoppers the ability to save credit cards, bank accounts, and PayPal accounts for a faster checkout experience.
Attach Instrument to Customer
POST https://payments.bigcommerce.com/stores/{store_hash}/stored-instrumentsRequest
Adds an instrument to customer.
Authentication
- Authorization in header in the format of IAT {{INSTRUMENT_ACCESS_TOKEN}}
Parameters
- store_hash in path - string
- Accept in header with default of application/vnd.bc+json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
payment_method_idstring
requiredIdentifier for payment method that will be used for this instrument obtained from Payment Methods API.Example: braintree.paypalcurrency_codestring
requiredThe instrument currency.Example: USDcustomer_idstring
requiredThe ID of the customer to add instrument for.Example: 1default_instrumentboolean
Set this instrument as default for customer?instrument
requiredAny of:object object numberstring
requiredThe raw card number.Example: 4111111111111111expiration_yearinteger
requiredThe expiration year.Example: 2024expiration_monthinteger
requiredThe expiration day.Example: 12verification_valuestring
requiredThe security code.Example: 123cardholder_namestring
requiredThe cardholder name.Example: test nametypestring
requiredThe type of instrument. For this case "raw_card".Allowed: raw_card | tokenized_card | tokenized_paypal_account
Example: raw_card
trusted_shipping_addressesarray[object] Trusted shipping address for instrument.billing_addressobject requiredExample: {"first_name":"Tester","last_name":"Tester","email":"example@email.com","company":"","street_1":"1 Sample Street","street_2":"","city":"Tampa","state_or_province_code":"NV","country_code":"US","phone":"101-192-0293","postal_code":"55555"}
example
Response
Created instrument
Body
object | application/json
dataobject Any of:object object tokenstring
The BigCommerce instrument token.Example: e4e43db4454391cee7608673d530d91fc87ea3d5c75315601bd939d1281f70e2typestring
The instrument type.Example: credit_cardis_defaultboolean
Identifies whether this stored instrument is default for the customer.brandstring
The card brand.Example: visaexpiry_monthinteger
The expiry month for this card.Min: 1Max: 12expiry_yearinteger
The expiry year for this card.binstring
The bank identification number.Example: 411111last_4string
The last four digits of this card.Example: 1111billing_addressobject Example: {"first_name":"Tester","last_name":"Tester","email":"example@email.com","company":"","street_1":"1 Sample Street","street_2":"","city":"","state_or_province_code":"NV","country_code":"US","phone":"101-192-0293","postal_code":"55555"}
paypal_instrument
credit_card_instrument
Did you find what you were looking for?