For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Payments
          • Stored Instruments (Beta)
              • POSTCreate Instrument Access Token
              • GETList Instruments
              • POSTBulk Import Instruments
              • PUTUpdate Instrument
              • DELBulk Delete Instruments
              • DELRemove Instrument from Store and Gateway
              • GETList Available Payment Method Ids
        • Methods
          • Transactions (Beta)
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminPaymentsStored Instruments (Beta)Manage Instruments

Bulk Import Instruments

Beta
POST
https://api.bigcommerce.com/stores/:store_hash/v3/payments/stored-instruments
POST
/stores/:store_hash/v3/payments/stored-instruments
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/payments/stored-instruments \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "payment_method_id": "braintree.credit_card",
> "currency_code": "USD",
> "customer_id": 1,
> "instrument": {
> "vault_token": "5292sx35",
> "provider_customer_id": "321123",
> "type": "credit_card",
> "brand": "visa",
> "expiry_year": 26,
> "expiry_month": 11,
> "last_4": "1111",
> "iin": "411111"
> },
> "billing_address": {
> "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_code": "TX",
> "country_code": "US",
> "phone": "101-192-0293",
> "postal_code": "55555"
> }
> }
>]'
1{
2 "data": [
3 {
4 "customer_id": 1,
5 "provider_vault_token": "provider_token",
6 "instrument": {
7 "token": "84596bea275fa254da820056bdc3e495bdf01fd11c51b0336347d447ee16200c",
8 "type": "paypal_account",
9 "is_default": true,
10 "email": "bc-buyer-paypal-express@bigcommerce.com"
11 }
12 },
13 {
14 "customer_id": 1,
15 "provider_vault_token": "provider_token",
16 "instrument": {
17 "token": "84596bea275fa254da820056bdc3e495bdf01fd11c51b0336347d447ee16200c",
18 "type": "bank_account",
19 "is_default": true,
20 "issuer": "011000015",
21 "masked_account_number": "0000"
22 }
23 },
24 {
25 "customer_id": 1,
26 "provider_vault_token": "provider_token",
27 "instrument": {
28 "token": "84596bea275fa254da820056bdc3e495bdf01fd11c51b0336347d447ee16200c",
29 "type": "credit_card",
30 "is_default": true,
31 "brand": "visa",
32 "expiry_month": 1,
33 "expiry_year": 1,
34 "iin": "411111",
35 "last_4": "1111",
36 "billing_address": {
37 "first_name": "Tester",
38 "last_name": "Tester",
39 "email": "example@email.com",
40 "company": "",
41 "address1": "1 Sample Street",
42 "address2": "",
43 "city": "",
44 "state_or_province": "Nevada",
45 "state_or_province_code": "NV",
46 "country_code": "US",
47 "phone": "101-192-0293",
48 "postal_code": "55555"
49 }
50 }
51 }
52 ],
53 "errors": [],
54 "meta": {
55 "total": 3,
56 "success": 3,
57 "failed": 0
58 }
59}
Imports instruments that were vaulted outside the store.
Was this page helpful?
Previous

List Instruments

Next

Update Instrument

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Create Payments | create | `store_payments_access_token_create` | | Get Payment Methods | read-only | `store_payments_methods_read` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Request

This endpoint expects a list of objects.
payment_method_idstringRequired
Identifier for the payment method that will be used for this instrument is obtained from the Payment Methods API.
currency_codestringRequired
The instrument currency.
customer_idintegerRequired
The ID of the customer.
instrumentobjectRequired
The instrument details.
billing_addressobjectRequired
trusted_shipping_addresseslist of objectsOptional
The trusted shipping address for an instrument.
default_instrumentbooleanOptional
Make instrument default.

Response

All instruments were successfully imported.
datalist of objects
Successfully imported instruments.
errorslist of objects
Errors with detailed errors indexed by input parameters.
metaobject
Response metadata.

Errors

401
Unauthorized Error
422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Create Paymentscreatestore_payments_access_token_create
Get Payment Methodsread-onlystore_payments_methods_read

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

The MIME type of the response body.