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 /stores/{store_hash}/stored-instruments
Request
Adds an instrument to customer.
Authentication
- IAT {{INSTRUMENT_ACCESS_TOKEN}} in headerrequired
Parameters
- store_hash in path - string
- Accept in header with default of application/vnd.bc+json - stringrequired
The MIME type of the response body.
- Content-Type in header with default of application/json - stringrequired
The MIME type of the request body.
Body
payment_method_idstring
requiredIdentifier for payment method that will be used for this instrument obtained from Payment Methods API.
Example: braintree.paypal
currency_codestring
requiredThe instrument currency.
Example: USD
customer_idstring
requiredThe ID of the customer to add instrument for.
Example: 1
default_instrumentboolean
Set this instrument as default for customer?
instrument
requiredAny of:object object numberstring
requiredThe raw card number.
Example: 4111111111111111
expiration_yearstring
requiredThe expiration year.
Example: 2024
expiration_monthstring
requiredThe expiration day.
Example: 12
verification_valuestring
requiredThe security code.
Example: 123
cardholders_namestring
requiredThe cardholder name.
Example: test name
typestring
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 Example: {"first_name":"Tester","last_name":"Tester","email":"example@email.com","company":"","street_1":"1 Sample Street","street_2":"","city":"Tampa","state_code":"NV","country_code":"US","phone":"101-192-0293","zip":"55555"}
example
Response
Created instrument
Body
data metaobject
Response metadata.