Stored Instruments
List All Instruments
GET https://api.bigcommerce.com/stores/{store_hash}/v3/payments/stored-instrumentsRequest
Lists all available stored instruments for a store. This list will include all types of stored instruments namely card, account, and bank_account instruments.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - integer
The requested page.
- limit in query - integer
The maximum number of results.
example
Response
OK
Body
dataarray[]
credit_card_example
paypal_account_example
bank_account_example
Bulk Import Instruments
POST https://api.bigcommerce.com/stores/{store_hash}/v3/payments/stored-instrumentsRequest
Imports instruments that were vaulted outside the store.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
payment_method_idstring
requiredIdentifier for the payment method that will be used for this instrument is obtained from the Payment Methods API.
Example: braintree.credit_cardcurrency_codestring
requiredThe instrument currency.
Example: USDcustomer_idinteger
requiredThe ID of the customer.
Example: 1instrument
The instrument details.
Any of:object object vault_tokenstring
The token from the provider's vault.
Example: 5292sx35provider_customer_idstring
The customer ID in the provider's vault.
Example: 321123typestring
The instrument type.
Example: credit_cardbrandstring
Card brand.
Example: visaexpiry_yearinteger
Expiration year.
Example: 2066expiry_monthinteger
Expiration month.
Example: 12last_4string
Last four digits of card.
Example: 1111iinstring
Issuer identification number.
Example: 411111
billing_addressobject requiredExample: {"first_name":"Sam","last_name":"Williams","email":"sam.williams@email.com","company":"BigCommerce","street_1":"1 Sample Street","street_2":"Bldg 5","city":"Austin","state_or_province":"Texas","state_or_province_code":"TX","phone":"101-192-0293","postal_code":"55555","country_code":"US"}trusted_shipping_addressesarray[object] The trusted shipping address for an instrument.
default_instrumentboolean
Make instrument default.
example
Response
All instruments were successfully imported.
Body
dataarray[] Successfully imported instruments.
errorsarray[object] Errors with detailed errors indexed by input parameters.
example
Update Instrument
Request
Updates an instrument in store and can update billing address in the provider's vault. As of this writing, only the Braintree gateway supports updating customer billing addresses. If billing_address is included in the request, an attempt will be made to update the billing address at provider's vault.
Authentication
- X-Auth-Token in headerrequired
Show details
Parameters
- store_hash in path - string
Body
tokenstring
requiredbilling_addressobject Example: {"first_name":"Sam","last_name":"Williams","email":"sam.williams@email.com","company":"BigCommerce","street_1":"1 Sample Street","street_2":"Bldg 5","city":"Austin","state_or_province":"Texas","state_or_province_code":"TX","phone":"101-192-0293","postal_code":"55555","country_code":"US"}trusted_shipping_addressesarray[object] requiredmake_defaultboolean
example
Response
Instrument successfully updated.
Body
data
Any of:object object customer_idinteger
The ID of the customer.
Example: 1tokenstring
An identifier representing this stored instrument.
Example: 84596bea275fa254da820056bdc3e495bdf01fd11c51b0336347d447ee16200ctypestring
Type of instrument.
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.
iinstring
The issuer 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":"","address1":"1 Sample Street\"","address2":"","city":"some city","state_or_province":"Nevada","state_or_province_code":"NV","country_code":"US","phone":"101-192-0293","postal_code":"55555"}
example
Bulk Delete Instruments
Request
Deletes instruments from the store without triggering deletion on the provider side.
Authentication
- X-Auth-Token in headerrequired
Show details
Parameters
- store_hash in path - string
- token:in in query - stringrequired
Filter by a list of tokens.
example
Response
Remove Instrument from Store and Gateway
Request
Deletes instrument from store and provider's vault.
Authentication
- X-Auth-Token in headerrequired
Show details
Parameters
- store_hash in path - string
- instrument_token in path - stringrequired