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
| Parameter | In | Description | Example |
|---|---|---|---|
apikey | Path | Your API key | PCW45-12345-12345-1234X |
iban | Body | The IBAN to validate | GB24BKEN10000031510604 |
Querystring parameters
| Parameter | Description | Example |
|---|---|---|
format | Sets the format of the response, xml or json (default unless "application/xml" header is detected) | format=json |
identifier | Specifies 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 clients | identifier=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
| Field | Description | Example | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
valid | A 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 IBAN | true | ||||||||
stateid |
| 1 | ||||||||
iban | The IBAN | GB24BKEN10000031510604 | ||||||||
countrycode | The two-letter ISO 3166-1 alpha-2 country code extracted from the IBAN (for example, GB, DE, FR) | GB | ||||||||
checkdigits | The 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 check | 24 | ||||||||
bankidentifier | The bank identifier extracted from the IBAN. The format and length vary by country and are defined by the country's IBAN specification | BKEN | ||||||||
branchidentifier | The 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 UK | 100000 | ||||||||
accountnumber | The bank account number extracted from the IBAN | 31510604 | ||||||||
bban | The Basic Bank Account Number extracted from the IBAN | BKEN10000031510604 | ||||||||
sortcode | The sort code extracted from the IBAN; UK IBANs only | 100000 | ||||||||
directdebits | A 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 only | false | ||||||||
fasterpayments | A true / false indicating whether the bank account supports the Faster Payments Service (FPS); UK IBANs only | false | ||||||||
chaps | A true / false indicating whether the bank account supports sterling payments using the Clearing House Automated Payment System (CHAPS); UK IBANs only | true | ||||||||
bacs | A true / false indicating whether the bank account supports Bacs; UK IBANs only | true | ||||||||
bankbic | The 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 only | BKENGB33 | ||||||||
branchbic | The 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 only | XXX | ||||||||
bankname | The full name of the bank which is formally approved by the Payment Systems Regulator; UK IBANs only | BANK OF ENGLAND | ||||||||
branchname | The full name of the branch which is formally approved by the Payment Systems Regulator; UK IBANs only | HEAD OFFICE | ||||||||
addressline1 | The contact address for the branch to be used for Bacs enquiries; usually a contact centre rather than the branch's physical address; UK IBANs only | Threadneedle Street | ||||||||
addressline2 | ||||||||||
addressline3 | ||||||||||
addressline4 | ||||||||||
posttown | London | |||||||||
postcode | EC2R 8AH | |||||||||
phone1 | The primary telephone number for Bacs enquiries including the country code (where international) and the area code; UK IBANs only | 020 34614717 | ||||||||
phone2 | The 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
identifierquerystring 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
validandstateidresponse 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.
