Instruments

​

Create an instrument

​

Create a payment instrument like card, bank, ach or sepa to use for future payments and payouts.

The parameters you need to provide when creating a bank account payment instrument depend on the account's country and currency. See the payout formatting documentation, or use the GET /validation/bank-accounts/{country}/{currency} endpoint.

Body·
required
application/json

The type of instrument to be stored

  • The type of instrument to be stored

    Store bank account details

    • type
      Discriminator
      required
      • Type: string · enum

        The type of instrument. bank_account payment instruments only support payouts.

        values
        • bacs
        • bank_account
        • card
        • token
        • sepa
        • ach
    • currency
      Type: string
      required

      The three-letter ISO currency code of the account's currency

    • country
      Type: string
      required

      The two-letter ISO country code of where the account is based

    • account_type
      Type: string enum

      The type of account

      values
      • savings
      • current
      • cash
    • account_number
      Type: string

      Number (which can contain letters) that identifies the account

    • bank_code
      Type: string

      Code that identifies the bank

    • branch_code
      Type: string

      Code that identifies the bank branch

    • iban
      Type: string

      Internationally agreed standard for identifying bank account

    • bban
      Type: string

      The combination of bank code and/or branch code and account number

    • swift_bic
      Type: string

      8 or 11 character code which identifies the bank or bank branch

    • processing_channel_id
      Type: string

      The ID of the primary processing channel this instrument is intended to be used for

    • account_holder

      The bank account holder details. Having accurate and complete data improves payout performance (increases success rate and the prevents delays).

      Store a previously tokenized instrument

      • type
        Discriminator
        Type: string enum
        required

        The type of the legal account holder.

        values
        • individual
        • corporate
        • government
      • first_name
        Type: string
        required

        The legal first name of the account holder.

      • last_name
        Type: string
        required

        The legal last name of the account holder.

      • billing_address
        Type: object ·
        required

        The current billing address associated with the destination account. Required for payouts to individuals. Strongly recommended when available.

      • tax_id
        Type: string

        The legal account holder's tax number or reference.

      • date_of_birth
        Type: string Format: date

        The account holder's date of birth in a YYYY-MM-DD format. Strongly recommended where available.

      • country_of_birth
        Type: string

        The two-letter ISO country code of the account holder's country of birth.

      • residential_status
        Type: string enum

        The account holder's residential status.

        values
        • resident
        • non_resident
      • phone
        Type: object ·

        The phone number of the account holder.

      • identification
        Type: object

        The account holder's government document identification. For example, the social security number (SSN).

    • bank
      Type: object ·

      Details of the bank

    • customer
      Type: object ·

      The customer's details

    • metadata
      Type: object ·

      Your own key-value pairs to store with the payment instrument.

      If the request matches a payment instrument you've already stored (for example, the same card for the same customer), the response returns the existing instrument's metadata, and the metadata in this request is not stored. To change it, use the Update an instrument endpoint.

      You can reference metadata values in Forward API requests using the {{metadata.KEY}} placeholder.

Responses
  • application/json
  • application/json
  • 401

    Unauthorized

  • application/json
  • application/json
  • 500

    Internal Error

Request Example for post/instruments
curl 'https://{prefix}.api.sandbox.checkout.com/instruments' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "type": "bank_account",
  "account_type": "savings",
  "account_number": "13654567455",
  "bank_code": "123-456",
  "branch_code": "6443",
  "iban": "HU93116000060000000012345676",
  "bban": "3704 0044 0532 0130 00",
  "swift_bic": "37040044",
  "currency": "GBP",
  "country": "GB",
  "processing_channel_id": "pc_u2l6xz5joigedmk7g5vxzt7rqy",
  "account_holder": {
    "type": "individual",
    "first_name": "John",
    "last_name": "Smith",
    "tax_id": "123456",
    "date_of_birth": "1986-01-01",
    "country_of_birth": "GB",
    "residential_status": "resident",
    "billing_address": {
      "address_line1": "123 High St.",
      "address_line2": "Flat 456",
      "city": "London",
      "state": "",
      "zip": "SW1A 1AA",
      "country": "GB"
    },
    "phone": {
      "country_code": "+1",
      "number": "415 555 2671"
    },
    "identification": {
      "type": "SSN",
      "issuing_country": "",
      "number": ""
    }
  },
  "bank": {
    "name": "Lloyds TSB",
    "branch": "Bournemouth",
    "address": {
      "address_line1": "123 High St.",
      "address_line2": "Flat 456",
      "city": "London",
      "state": "",
      "zip": "SW1A 1AA",
      "country": "GB"
    }
  },
  "customer": {
    "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
    "email": "brucewayne@gmail.com",
    "name": "Bruce Wayne",
    "phone": {
      "country_code": "+1",
      "number": "415 555 2671"
    },
    "default": true
  },
  "metadata": {
    "documentNumber": "12345678900",
    "partnerId": "partner_123"
  }
}'
{
  "type": "bank_account",
  "id": "src_wmlfc3zyhqzehihu7giusaaawu",
  "fingerprint": "vnsdrvikkvre3dtrjjvlm5du4q",
  "account_number": "13654567455",
  "bank_code": "123-456"
}

Get instrument details

​

Retrieve the details of a payment instrument.

Path Parameters
  • id
    Type: string Pattern: ^(src)_(\w{26})$
    required

    The instrument ID

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Instrument not found

Request Example for get/instruments/{id}
curl 'https://{prefix}.api.sandbox.checkout.com/instruments/{id}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "type": "bank_account",
  "id": "src_wmlfc3zyhqzehihu7giusaaawu",
  "fingerprint": "vnsdrvikkvre3dtrjjvlm5du4q",
  "account_type": "savings",
  "account_number": "13654567455",
  "bank_code": "123-456",
  "currency": "GBP",
  "country": "GB"
}

Update an instrument

​

Update the details of a payment instrument.

To replace the metadata stored with a card or bank account payment instrument, provide the full metadata object. You can send a request that only contains metadata, without changing any card or bank account details.

Path Parameters
  • id
    Type: string Pattern: ^(src_)[a-z0-9]{26}$
    required

    The instrument ID

Body·
required
application/json
  • The type of instrument to be updated

    Update bank account details

    • type
      Discriminator
      Type: string

      The type of instrument. card payment instruments.

    • expiry_month
      Type: integer
      min:  
      1

      The expiry month of the card

    • expiry_year
      Type: integer

      The expiry year of the card

    • name
      Type: string

      Name of the cardholder

    • account_holder
      Type: object ·

      The account holder details

    • customer
      Type: object ·

      The customer's details

    • metadata
      Type: object | null ·

      Replaces the metadata stored with the payment instrument.

      The object you provide replaces the existing metadata in full. Individual keys are not merged, so to change a single key, provide the full object with that key updated. To remove all metadata, provide an empty object ({}).

      If you do not provide metadata, or you set it to null, the stored metadata is not changed. Updating other fields does not change the stored metadata.

      You can send a request that only contains metadata.

Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Instrument not found or not associated with client

  • application/json
  • application/json
  • 500

    Internal Error

Request Example for patch/instruments/{id}
curl 'https://{prefix}.api.sandbox.checkout.com/instruments/src_ubfj2q76miwundwlk72vxt2i7q' \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "type": "",
  "expiry_month": 6,
  "expiry_year": 2025,
  "name": "Mr. J Smith",
  "account_holder": {
    "first_name": "John",
    "last_name": "Smith",
    "billing_address": {
      "address_line1": "123 High St.",
      "address_line2": "Flat 456",
      "city": "London",
      "state": "",
      "zip": "SW1A 1AA",
      "country": "GB"
    },
    "phone": {
      "country_code": "+1",
      "number": "415 555 2671"
    }
  },
  "customer": {
    "id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
    "default": true
  },
  "metadata": {
    "documentNumber": "12345678900",
    "partnerId": "partner_123"
  }
}'
{
  "type": "card",
  "fingerprint": "smoua2sbuqhupeofwbe77n5nsm"
}

Delete an instrument

​

Delete a payment instrument.

Path Parameters
  • id
    Type: string Pattern: ^(src_)[a-z0-9]{26}$
    required

    The ID of the payment instrument to be deleted

Responses
  • 204

    Instrument deleted successfully

  • 401

    Unauthorized

  • 404

    Instrument not found or not associated with client

  • application/json
  • 500

    Internal Error

Request Example for delete/instruments/{id}
curl 'https://{prefix}.api.sandbox.checkout.com/instruments/src_ubfj2q76miwundwlk72vxt2i7q' \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body

Get bank account field formatting

​

Returns the bank account field formatting required to create bank account instruments or perform payouts for the specified country and currency.

Path Parameters
  • country
    Type: string
    min length:  
    2
    max length:  
    2
    required

    The two-letter ISO country code

  • currency
    Type: string
    min length:  
    3
    max length:  
    3
    required

    The three-letter ISO currency code

Query Parameters
  • account-holder-type
    Type: string enum

    The type of account holder that will be used to filter the fields returned

    values
    • individual
    • corporate
    • government
  • payment-network
    Type: string enum

    The banking network that will be used to filter the fields returned

    values
    • local
    • sepa
    • fps
    • ach
    • fedwire
    • swift
Responses
  • application/json
  • 401

    Unauthorized

  • 404

    Fields not found

  • application/json
Request Example for get/validation/bank-accounts/{country}/{currency}
curl 'https://{prefix}.api.sandbox.checkout.com/validation/bank-accounts/{country}/{currency}' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "sections": [
    {
      "name": "Account Details",
      "fields": [
        {
          "id": "iban",
          "type": "string",
          "display": "IBAN",
          "description": "Number (which can contain letters) that identifies the account",
          "section": "account",
          "required": true,
          "validation_regex": "^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,18}$",
          "min_length": 22,
          "max_length": 22
        },
        {
          "id": "account_holder.first_name",
          "type": "string",
          "display": "First name",
          "description": "The account holder's first name",
          "section": "account",
          "required": true
        },
        {
          "id": "account_holder.last_name",
          "type": "string",
          "display": "First name",
          "description": "The account holder's last name",
          "section": "account",
          "required": true
        }
      ]
    }
  ]
}