The BAV API checks whether a name matches the holder of a bank account before you send a payment. You send an account and the name you expect. The API asks the account holder's bank and tells you whether the name matches, nearly matches or does not match. For a near match it can also return the name the bank holds.
You can identify the account in two ways: by IBAN, or by a domestic bank code and account number for the United Kingdom and the United States.
country_code, bank_code (sort code or ABA routing number) and account instead of IBAN./v3/ to /v4/ in the URL.https://api.iban.com/clients/api/verify/v4/405 METHOD_NOT_ALLOWED.Content-Type: application/json. Any other content type returns 415 UNSUPPORTED_FORMAT.X-API-Key header.application/json; charset=UTF-8).401 IP_NOT_ALLOWED.| Header | Required | Value | Description |
|---|---|---|---|
X-API-Key | Yes | string | Your API key. If it is missing you get 400 MISSING_API_KEY. |
Content-Type | Yes | application/json | A charset parameter (e.g. application/json; charset=utf-8) is allowed. Anything else returns 415. |
The body is a JSON object. Which fields you send decides the mode:
IBAN and name.country_code, bank_code, account and name, and leave IBAN out.If IBAN is present and not empty, IBAN mode is used and country_code, bank_code and account are ignored. Field names are case-sensitive. Any other fields are ignored.
| Field | Required | Value | Description |
|---|---|---|---|
IBAN | IBAN mode | string | The account's IBAN. Spaces and punctuation are removed and letters are upper-cased, so de89 3704-0044 0532 0130 00 is accepted. |
name | Always | string | The name you expect the account to be held in: a person or a company, UTF-8. |
country_code | Domestic mode | string | ISO 3166 two-letter country code: GB or US. Letters are upper-cased and anything else is removed. |
bank_code | Domestic mode | string | The bank's national code. GB: 6-digit sort code. US: 9-digit ABA routing number. Spaces and dashes are removed, so 20-00-00 is accepted. |
account | Domestic mode | string | The account number. Spaces and punctuation are removed. |
AT Austria | BE Belgium | CY Cyprus |
DE Germany | EE Estonia | ES Spain |
FI Finland | FR France | GB United Kingdom |
GR Greece | HR Croatia | IE Ireland |
IT Italy | LT Lithuania | LU Luxembourg |
LV Latvia | MT Malta | NL Netherlands |
PT Portugal | SI Slovenia | SK Slovakia |
| Country | bank_code | Clearing system |
|---|---|---|
GB United Kingdom | Sort code (6 digits) | UK Domestic Sort Code (GBDSC) |
US United States | ABA routing number (9 digits) | ABA / Fedwire (USABA) |
Any other country returns 400 COUNTRY_NOT_SUPPORTED. For a UK account you can use either mode.
curl "https://api.iban.com/clients/api/verify/v4/" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"IBAN":"DE89370400440532013000","name":"Max Mustermann"}' \
--max-time 180The code is the same as above with a different body. With curl:
curl "https://api.iban.com/clients/api/verify/v4/" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"country_code":"GB","bank_code":"20-00-00","account":"55779911","name":"Jane Smith"}' \
--max-time 180For a US account, send "country_code":"US" with the 9-digit ABA routing number as bank_code.
A completed verification returns HTTP 200 with three members:
query: what was checked, after spaces and punctuation were removed.result: the verdict.error: a code explaining the verdict, or an empty string.The query fields depend on the mode. The result fields are the same in both modes.
{
"query": {
"IBAN": "DE89370400440532013000",
"name": "Max Mustermann",
"success": true
},
"result": {
"valid": true,
"name_match": "yes",
"bic": "COBADEFFXXX",
"suggested_name": ""
},
"error": ""
}{
"query": {
"country_code": "GB",
"bank_code": "200000",
"account": "55779911",
"name": "Jane Smith",
"success": true
},
"result": {
"valid": true,
"name_match": "yes",
"bic": "BARCGB22XXX",
"suggested_name": ""
},
"error": ""
}| Field | Mode | Type | Description |
|---|---|---|---|
query.IBAN | IBAN | string | The IBAN that was checked, cleaned and upper-cased. |
query.country_code | Domestic | string | GB or US. |
query.bank_code | Domestic | string | The sort code or routing number, digits only. |
query.account | Domestic | string | The account number, cleaned. |
query.name | Both | string | The name you sent. Non-ASCII characters come back escaped, e.g. Müller. |
query.success | Both | boolean | Always true on a 200. |
result.valid | Both | boolean or null | true: the bank accepted the account (the name may still not match exactly; check name_match). false: the bank rejected the account and name pair. null: no verdict. |
result.name_match | Both | string | yes, partial, no or unavailable. |
result.bic | Both | string | The bank's BIC, always 11 characters (8-character BICs get XXX added). |
result.suggested_name | Both | string | On a partial match, the name the bank holds, if it shares it. Otherwise empty. |
error | Both | string | Empty, or a code from Completed verifications. |
The name is close but not exact, e.g. a typo or a missing middle name. The bank may return the name it holds.
{
"query": {
"IBAN": "DE89370400440532013000",
"name": "Max Musterman",
"success": true
},
"result": {
"valid": true,
"name_match": "partial",
"bic": "COBADEFFXXX",
"suggested_name": "Max Mustermann"
},
"error": "NAME_PARTIAL_MATCH"
}{
"query": {
"IBAN": "DE89370400440532013000",
"name": "John Doe",
"success": true
},
"result": {
"valid": false,
"name_match": "no",
"bic": "COBADEFFXXX",
"suggested_name": ""
},
"error": "NAME_NOT_MATCH"
}The bank answered but gave no name verdict.
{
"query": {
"IBAN": "DE89370400440532013000",
"name": "Max Mustermann",
"success": true
},
"result": {
"valid": true,
"name_match": "unavailable",
"bic": "COBADEFFXXX",
"suggested_name": ""
},
"error": ""
}When a request is refused, the body has only an error member, with no query or result:
{"error":"COUNTRY_NOT_SUPPORTED"}Checks run in the order below; you get the first one that fails.
| HTTP | Code | Meaning | Query used | What to do |
|---|---|---|---|---|
| 405 | METHOD_NOT_ALLOWED | The request was not POST. | No | Use POST. |
| 415 | UNSUPPORTED_FORMAT | Content-Type is missing or is not application/json. | No | Set the header. |
| 400 | MISSING_API_KEY | No X-API-Key header. | No | Add the header. |
| 400 | INVALID_JSON | The body is empty or is not valid JSON. | No | Fix the body. |
| 400 | MISSING_INPUT_IBAN | Neither IBAN nor country_code was sent. | No | Send an IBAN, or the domestic fields. |
| 400 | MISSING_INPUT_NAME | name is missing or empty. | No | Send a name. |
| 401 | INVALID_API_KEY | The key is not known. | No | Check the key in your account. |
| 401 | IP_NOT_ALLOWED | The key is restricted to other IP addresses. | No | Add your server's IP to the key's access list. |
| 401 | USER_NOT_ALLOWED | The BAV service is not active on your account. | No | Contact us to enable it. |
| 401 | SUBSCRIPTION_EXPIRED | Your BAV subscription has expired. | No | Renew the subscription. |
| 401 | NO_CREDITS_AVAILABLE | Your query balance is used up. | No | Buy more queries. |
| 400 | COUNTRY_NOT_SUPPORTED | The IBAN's country, or country_code in domestic mode, is not supported. | No | Don't retry. |
| 500 | INTERNAL_SERVER_ERROR:BNFDBS | The bank code (from the IBAN, or bank_code) was not found in our bank directory. This includes a missing bank_code in domestic mode. | No | Check the bank details. Don't retry unchanged. |
| 400 | INVALID_IBAN_CHECKSUM | IBAN mode only: the IBAN's check digits are wrong. The bank code is looked up first, so if the typo is in the bank code you get BNFDBS instead. | Yes | Ask the payer to check the IBAN. |
| 500 | INTERNAL_SERVER_ERROR:UNERSP | The request to the bank network failed or returned an unexpected answer. | Yes | Retry later. A retry uses another query. |
| 429 | — | More than 20 requests per second. | No | Slow down and retry. |
| 500 | INTERNAL_SERVER_ERROR:… | Any other server error. | — | Match on the INTERNAL_SERVER_ERROR prefix. Retry later. |
Every row below is HTTP 200 with query.success = true, and uses one query.
error | name_match | valid | Meaning |
|---|---|---|---|
"" | yes | true | The name matches the account holder. |
NAME_PARTIAL_MATCH | partial | true | Close match. The bank's name may be in suggested_name. |
NAME_NOT_MATCH | no | false | The bank holds a different name. |
"" | unavailable | true | The bank answered without a name verdict. |
"" | no | false | The bank rejected the account for a reason other than the name, e.g. the account is closed or does not exist. |
VERIFICATION_NOT_SUPPORTED | unavailable | null | The bank or account is not part of the verification scheme. |
VOP_REQUEST_FAILED | unavailable | null | The bank did not give an answer. |
| You get | What to do |
|---|---|
400, 405, 415 | Fix the request. Retrying the same request gives the same answer. |
401 | Fix the account or key issue named in error. Don't retry in a loop. |
429 | Back off for a second and retry. |
500 …:BNFDBS | Treat it as bad bank details. Ask the payer to check them. |
500 …:UNERSP or other 500 | Retry later with backoff. Remember that each UNERSP uses a query. |
| Timeout | Make sure you wait at least 180 seconds. If you time out first, the query may still have been used. |
name_match, not valid on its own. valid: true also covers partial matches and answers with no name verdict.yes: safe to pay as far as the name is concerned.partial: show the payer the name the bank holds, if one is returned, and let them confirm or correct it.no: warn the payer that the name does not match. If error is empty, the account itself was rejected.unavailable or valid: null: the name was not verified. Tell the payer the check could not be completed.https://sandbox.iban.com/clients/api/verify/v4/The sandbox is free and uses no queries. Use the key testkey. These keys return the matching 401 refusals:
| Key | Returns |
|---|---|
nomorecredits | 401 NO_CREDITS_AVAILABLE |
serviceexpired | 401 SUBSCRIPTION_EXPIRED |
usernotallowed | 401 USER_NOT_ALLOWED |
ipnotallowed | 401 IP_NOT_ALLOWED |
The services endpoint returns every service on your account with its remaining queries and expiry date, the same information as My Services. Poll it from your monitoring to catch a low balance before the API starts answering 401 NO_CREDITS_AVAILABLE. It takes your api_key and a format (json or xml) and does not use a query.
https://api.iban.com/clients/api/v4/services/?api_key=YOUR_API_KEY&format=jsonhttps://api.iban.com/clients/api/v4/services/?api_key=YOUR_API_KEY&format=xmlThe response, shortened to the entry of this service (the endpoint lists every service on your account, one object each):
{
"services": [
{
"service_name": "BAV (2,500 queries)",
"credits": 52,
"expiry_date": "2027-05-15",
"service_expired": 0
}
],
"errors": []
}The HTTP status is 200 in every case. With a wrong key, services is empty and errors carries code 301 ({"services":[],"errors":[{"code":"301","message":"API Key is invalid"}]}); without format the body is empty.
| Field | Type | Description |
|---|---|---|
service_name | string | Name of the service as shown under My Services. The BAV entry carries the plan size in brackets: BAV (2,500 queries). Match on the prefix BAV. |
credits | number or string | Remaining queries. Services without a quota return the string Unlimited instead of a number, so test the type before comparing. |
expiry_date | string | Expiry date of the service, YYYY-MM-DD. Requests after this date are refused as expired. |
service_expired | 0 or 1 | 1 when the service has expired. |
429, are not processed and use no query.200) uses one query, whatever the result.INVALID_IBAN_CHECKSUM and INTERNAL_SERVER_ERROR:UNERSP also use one query. No other refusal uses one.| Term | Meaning |
|---|---|
| BAV | Bank Account Verification: checking that an account exists and belongs to the expected name. |
| VOP | Verification of Payee: the EU scheme under which banks confirm the payee's name before a credit transfer. |
| IBAN | International Bank Account Number (ISO 13616). |
| BIC | Bank Identifier Code, also called SWIFT code (ISO 9362). 8 or 11 characters; this API always returns 11. |
| Sort code | The 6-digit UK code that identifies a bank branch. |
| ABA routing number | The 9-digit US code that identifies a bank. |
| Clearing system | The national payment system a domestic bank code belongs to (GBDSC for the UK, USABA for the US). |
| Query | One unit of your BAV balance. |