Cookie

Cookie consent

We use some essential cookies to make this website work. We'd like to set additional cookies to help us measure your experience when you view and interact with the website.

Cookie policy

bank/iban

This API endpoint validates an international bank account number (IBAN) by checking its checksum and verifying its length and format against the country indicated by its first two characters. Use it to verify IBANs before setting up payments.

For UK IBANs, the API endpoint also returns bank and branch details using the latest data from the Extended Industry Sort Code Directory (EISCD).

Always verify details with the sender or recipient before setting up payments.

Request URL and body

https://ws.postcoder.com/pcw/{apikey}/bank/iban
{
	"iban": "{iban}"
}

Path and body parameters

ParameterInDescriptionExample
apikeyPathYour API keyPCW45-12345-12345-1234X
ibanBodyThe IBAN to validateGB24BKEN10000031510604

Querystring parameters

ParameterDescriptionExample
formatSets the format of the response, xml or json (default unless "application/xml" header is detected)format=json
identifierSpecifies your own meaningful identifier for the request such as "websiteA" or "client123"; you can view usage for each identifier on the Identifier Usage page, which may be helpful when using your API key across multiple websites, apps or clientsidentifier=websiteA

Example request and response

https://ws.postcoder.com/pcw/PCW45-12345-12345-1234X/bank/iban?format=json
{
	"iban": "GB24BKEN10000031510604"
}
{
    "valid": true,
    "stateid": 1,
    "iban": "GB24BKEN10000031510604",
    "countrycode": "GB",
    "checkdigits": "24",
    "bankidentifier": "BKEN",
    "branchidentifier": "100000",
    "accountnumber": "31510604",
    "bban": "BKEN10000031510604",
    "sortcode": "100000",
    "directdebits": false,
    "fasterpayments": false,
    "chaps": true,
    "bacs": true,
    "bankbic": "BKENGB33",
    "branchbic": "XXX",
    "bankname": "BANK OF ENGLAND",
    "branchname": "HEAD OFFICE",
    "addressline1": "Threadneedle Street",
    "posttown": "London",
    "postcode": "EC2R 8AH",
    "phone1": "020 34614717"
}

Response fields

FieldDescriptionExample
validA true / false indicating whether the IBAN is valid. A value of true means the IBAN passed checksum, length and format validation based on the country code contained within the IBANtrue
stateid
1Valid IBAN checksum, length and format, and sort code found in EISCD (UK only)
0Valid IBAN checksum, length and format
-1Not a valid IBAN
-2Country does not use IBANs
1
ibanThe IBANGB24BKEN10000031510604
countrycodeThe two-letter ISO 3166-1 alpha-2 country code extracted from the IBAN (for example, GB, DE, FR)GB
checkdigitsThe two-digit IBAN checksum located in positions 3 and 4 of the IBAN. Used to validate the integrity of the IBAN using the ISO 13616 MOD 97 check24
bankidentifierThe bank identifier extracted from the IBAN. The format and length vary by country and are defined by the country's IBAN specificationBKEN
branchidentifierThe branch identifier extracted from the IBAN. The format and length vary by country and are defined by the country's IBAN specification. Also known as the sort code in the UK100000
accountnumberThe bank account number extracted from the IBAN31510604
bbanThe Basic Bank Account Number extracted from the IBANBKEN10000031510604
sortcodeThe sort code extracted from the IBAN; UK IBANs only100000
directdebitsA true / false indicating whether the bank account can accept Direct Debits; note that not all accounts (such as savings accounts) can accept Direct Debits; UK IBANs onlyfalse
fasterpaymentsA true / false indicating whether the bank account supports the Faster Payments Service (FPS); UK IBANs onlyfalse
chapsA true / false indicating whether the bank account supports sterling payments using the Clearing House Automated Payment System (CHAPS); UK IBANs onlytrue
bacsA true / false indicating whether the bank account supports Bacs; UK IBANs onlytrue
bankbicThe Bank Identifier Code (BIC), also known as the SWIFT code, for the bank. This code is used to identify banks when processing international payments; UK IBANs onlyBKENGB33
branchbicThe Bank Identifier Code (BIC), also known as the SWIFT code, for the branch. This code is used to identify branches when processing international payments. A value of XXX indicates the bank's primary office rather than a specific branch; UK IBANs onlyXXX
banknameThe full name of the bank which is formally approved by the Payment Systems Regulator; UK IBANs onlyBANK OF ENGLAND
branchnameThe full name of the branch which is formally approved by the Payment Systems Regulator; UK IBANs onlyHEAD OFFICE
addressline1The contact address for the branch to be used for Bacs enquiries; usually a contact centre rather than the branch's physical address; UK IBANs onlyThreadneedle Street
addressline2
addressline3
addressline4
posttownLondon
postcodeEC2R 8AH
phone1The primary telephone number for Bacs enquiries including the country code (where international) and the area code; UK IBANs only020 34614717
phone2The secondary telephone number for Bacs enquiries including the country code (where international) and the area code; UK IBANs only

Integration advice

  • URL encode all special characters (including /) in your request parameters with %xx encoding
  • Verify your request was successful by checking for an HTTP status code of 200; see all HTTP status codes with descriptions
  • When using your API key across multiple websites, apps or clients, set the identifier querystring parameter to a meaningful value such as "websiteA" or "client123"; you'll then be able to view these identifiers and the number of requests made by each one on the Identifier Usage page
  • The valid and stateid response fields are always returned; treat all other response fields as optional

Credit cost

Each request costs 1.2 credits.

Buy a credit pack or set up a monthly plan to use with all Postcoder features.