Beneficiary Bank Accounts

GET Beneficiary Bank Account Metadata

The Get Beneficiary Bank Account Metadata API provides metadata for input validations when creating Beneficiary Bank Accounts via the API channel.

GET /beneficiary-bank-account-metadata/{country}/{currency}

There are two path parameters that this endpoint expects:

1. currency: currency of the beneficiary bank account
2. country: country of the beneficiary bank account

Inputs are used to gather Beneficiary Bank Account Validation metadata based on Country & Currency.

Example #1 : GET /beneficiary-bank-account-metadata/GB/GBP
When the input contains 'Country : GB - Currency : GBP', fields will be restricted to :

  • Account Number : 8 digit number
  • Sort Code : 6 digit number
  • IBAN (Optional)
  • BIC (Optional) : 8-11 Character Code

Example #2 : GET /beneficiary-bank-account-metadata/US/USD
When the input contains 'Country : US - Currency : USD', fields will be restricted to :
ABA : 9 Digit number
Account number : 8 digit number
BIC (Optional) : 8-11 Character Code

SAMPLE OUTPUT:

{
  "workflow": {},
  "data": {
    "beneficiaryMetadata": {
    "address": {
        "option": "optional/required",
        "country": {
          "option": "required",
          "regex": "^[A-Z]{2}$"
        },
        "region": {
          "option": "none/required",
          "regex": "^.{1,255}"
        },
        "city": {
          "option": "required",
          "regex": "^.{1,255}"
        },
        "street": {
          "option": "required",
          "regex": "^.{1,255}"
        },
        "houseNumber": {
          "option": "optional",
          "regex": "^.{1,255}"
        },
        "postalCode": {
          "option": "none/optional/required",
          "regex": "^.{1,12}"
        },
        "refinement": {
          "option": "optional",
          "regex": "^.{1,255}"
        }
      },
      "iban": {
        "option": "none/optional/required",
        "regex": "^TR\\d{7}[0][a-zA-Z0-9]{16}$"
      },
      "accountNumber": {
        "option": "none/optional/required",
        "regex": "^[0-9]{7,20}$"
      },
      "bankName": {
        "option": "none/optional/required",
        "regex": null
      },
      "routingCodes": {
        "bic": {
          "option": "none/optional/required",
          "regex": "^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$"
        }
      }
    }
  },
  "connect": {},
  "metadata": {}
}

Option field values :
- iban : 'none' , 'optional' or 'required'
- accountNumber : 'none' , 'optional' or 'required'
- bankName : 'none' , 'optional' or 'required'
- addressOption: 'optional' or 'required'

If an option value is 'none' for a field, it should not be sent.

Routing Code Types

Below is the list of possible routing code types:

Routing Code

Routing Code Key

Regex

Countries

Swift Number (BIC)

bic

^[A-Z]{6}[A-Z0-9]{2}([A-Z0-9]{3})?$

Any

Sort Code

sort-code

^(?!(?:0{6}))(?:\d{6})$

UK, Guernsey, Isle of Man, Jersey

ABA Number

aba

^(?!(?:0{9}))(?:\d{9})$"

US

Routing Number Canada

rtn-canada

^(?!(?:0{8,9}))(?:0?\d{8})$

Canada

Clabe

clabe

^(?!(?:0{18}))(?:\d{18})$

Mexico

BSB Code

bsb-code

^(?!(?:0{6}))(?:\d{6})$

Australia

IFSC

ifsc

^[A-Z]{4}0[A-Z0-9]{6}$

India

CNAPS

cnaps

^(?!(?:0{12}))(?:\d{12})$

China

Bank Code

bank-code

^(?!(?:0{3,5}))(?:\d{3,5})$

Denmark, Hong Kong, Norway, Sweden, Sri Lanka, South Korea, Japan, Pakistan, Brazil

Branch Code

branch-code

^\d{0,6}$

Sri Lanka, Brazil, Uruguay, Ghana, Kenya, Tanzania, Uganda, Japan

Create Beneficiary Bank Account

POST /beneficiaries/{beneficiaryId}/bank-accounts

{
    "workflow": {
        "code": "direct"
    },
    "data": {
        "bankAccount": {
            "country": "GB",
            "currency": "GBP",
            "accountNumber": "12345678",
            "iban": "GB72RABO1521764247",
            "routingCodes": {
                "bic": "YAPIGBIS",
                "sort-code": "123456"
            }
        }
    },
    "connect": {},
    "metadata": {}
}

Update Beneficiary Bank Account

PATCH /beneficiaries/{beneficiaryId}/bank-accounts/{beneficiaryBankAccountId}

{
    "workflow": {
        "code": "direct"
    },
    "data": {
        "bankAccount": {
            "country": "GB",
            "currency": "GBP",
            "accountNumber": "12345678",
            "iban": "GB12AB01234567890",
            "routingCodes": {
                "bic": "ABCDGBBK",
                "sort-code": "123456"
            }
        }
    },
    "connect": {},
    "metadata": {}
}