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 /stored-instruments

Request

Adds an instrument to customer.

Authentication

  • IAT {{INSTRUMENT_ACCESS_TOKEN}} in header
    required

Parameters

  • store_hash in path - string
  • Accept in header with default of application/vnd.bc+json - string
    required

    The MIME type of the response body.

  • Content-Type in header with default of application/json - string
    required

    The MIME type of the request body.

Body

object | application/json
  • payment_method_id
    string
    required

    Identifier for payment method that will be used for this instrument obtained from Payment Methods API.

    Example: braintree.paypal

  • currency_code
    string
    required

    The instrument currency.

    Example: USD

  • customer_id
    string
    required

    The ID of the customer to add instrument for.

    Example: 1

  • default_instrument
    boolean

    Set this instrument as default for customer?

  • instrument
    required

    Any of:
    • number
      string
      required

      The raw card number.

      Example: 4111111111111111

    • expiration_year
      string
      required

      The expiration year.

      Example: 2024

    • expiration_month
      string
      required

      The expiration day.

      Example: 12

    • verification_value
      string
      required

      The security code.

      Example: 123

    • cardholders_name
      string
      required

      The cardholder name.

      Example: test name

    • type
      string
      required

      The type of instrument. For this case "raw_card".

      Allowed: raw_card | tokenized_card | tokenized_paypal_account

      Example: raw_card

  • trusted_shipping_addresses
    array[object]

    Trusted shipping address for instrument.

  • billing_address
    object

    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

object | application/json
  • data

  • meta
    object

    Response metadata.

paypal_instrument

credit_card_instrument

Did you find what you were looking for?