Docs / API reference
IBAN Lookup
Validates an International Bank Account Number and returns its formats and country banking information.
Overview#
lookup/iban checks an IBAN passed in the iban parameter. It confirms the country code, length and check digits, then returns isValid, the IBAN in three presentations under formats (machine, human and obfuscated), and a country object with the name, ISO and IANA codes, currency, central bank, whether the country is in the EU or the SEPA area, the expected IBAN length and its SWIFT status.
When to use it#
- Catch typos in a payout or refund form before the transfer fails.
- Confirm that the bank country matches the customer's declared country.
- Store a clean, normalized IBAN, or display the
obfuscatedformat in your interface instead of the full number.
Reading the result#
isValidis the verdict. A false value means a wrong length for the country, an unknown country or a failed checksum, so ask the user to re-enter it.formats.machineis the compact string for your database and for bank APIs;formats.humangroups it in blocks of four for display.country.isSEPAandcountry.isEUhelp you decide which transfer rails and fees apply.bankidentifies the bank behind the IBAN's national bank code:code,name,nameArandswift(plusmergedIntowhen the bank has since merged into another, for example Samba into SNB). It covers Saudi Arabia, the UAE, Kuwait, Bahrain, Qatar and Jordan, and isnullfor other countries, for an unrecognised code, and for an invalid IBAN.- Validation means three things: the structure and length are right for the country, the checksum passes, and (where we have a table) the bank code is recognised. It cannot confirm that the account exists or belongs to the person: no public system can, because that needs the bank's own account-verification service. Keep your usual payout verification.
Notes#
- Counts as one request. Test mode returns fake data, is free and raises no events.
- Not part of the Standard plan; available on trial, Premium and pay-as-you-go. Without access you get error 117 (
feature_not_available). - Custom rules for the IBAN group can test the IBAN itself, its country and validity, and can mark it valid or invalid. The result is listed in
custom_rules_applied. - An
invalid_ibanevent is raised for invalid IBANs and is sent to your webhooks. - A missing or invalid value returns error 122 (
invalid_iban) with HTTP 200.
Request#
https://gurdx.cretip.com/api/lookup/iban
- Authenticate with the key parameter or an Authorization: Bearer header.
- Counts as 1 request.
- Available on: Free trial Premium Pay-as-you-go
Parameters#
| Name | Type | Description |
|---|---|---|
iban
required
query |
string |
The International Bank Account Number (IBAN) you want to validate. Sample value: BE71096123456769, or BE71 0961 2345 6769.
|
Every method also accepts format, lang, mode, userID, callback. See Options.
Code samples#
curl -G "https://gurdx.cretip.com/api/lookup/iban" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "iban=SA0380000000608010167519"
<?php
$response = file_get_contents('https://gurdx.cretip.com/api/lookup/iban?'.http_build_query(['key' => 'YOUR_API_KEY', 'iban' => 'SA0380000000608010167519']));
$result = json_decode($response, true);
if ($result['status'] === 'success') {
print_r($result['data']);
} else {
echo $result['code'].': '.$result['description'];
}
const params = new URLSearchParams({"key":"YOUR_API_KEY","iban":"SA0380000000608010167519"});
const res = await fetch(`https://gurdx.cretip.com/api/lookup/iban?${params}`);
const result = await res.json();
if (result.status === 'success') {
console.log(result.data);
} else {
console.error(result.code, result.description);
}
import requests
res = requests.get("https://gurdx.cretip.com/api/lookup/iban", params={"key": "YOUR_API_KEY", "iban": "SA0380000000608010167519"})
result = res.json()
if result["status"] == "success":
print(result["data"])
else:
print(result["code"], result["description"])
Response#
Success#
{
"data": {
"isValid": true,
"formats": {
"machine": "BE71096123456769",
"human": "BE71 0961 2345 6769",
"obfuscated": "BE** **** **** 6769"
},
"country": {
"name": "Belgium",
"IANA": "be",
"ISO3166": "BE",
"currency": "EUR",
"centralBank": {
"url": "http://www.nbb.be/",
"name": "National Bank of Belgium"
},
"membership": "eu_member",
"isEU": true,
"length": "16",
"isSEPA": true,
"swiftOfficial": true
},
"custom_rules_applied": {
"total": 0,
"rules": []
},
"bank": null
},
"status": "success",
"executionTime": 1
}Error#
Errors are delivered with HTTP 200 — always check the status field.
{
"status": "error",
"code": 101,
"type": "invalid_key",
"description": "The API Key is missing or invalid."
}Response fields#
| Name | Type | Description |
|---|---|---|
data.isValid |
boolean |
A boolean value that you can rely on to determine if the IBAN is valid or not. |
data.formats.machine |
string |
Machine format of the IBAN. |
data.formats.human |
string |
Human-readable format of the IBAN. |
data.formats.obfuscated |
string |
Obfuscated format of the IBAN. |
data.formats |
object |
— |
data.country.name |
string |
Country name where the issuing bank is located. |
data.country.IANA |
string |
The IANA of the country. |
data.country.ISO3166 |
string |
Country code in ISO3166 format.
|
data.country.currency |
string |
Currency of the country. |
data.country.centralBank.name |
string |
The name of the central bank of the issuing country. |
data.country.centralBank.url |
string |
The URL of the central bank of the issuing country. |
data.country.centralBank |
string |
— |
data.country.membership |
string |
Membership type of the bank. |
data.country.isEU |
boolean |
Determines whether the user is located within the European Union (EU) and is relevant for processing transactions or validations specific to EU countries. |
data.country.length |
string |
IBAN length in this country. |
data.country.isSEPA |
boolean |
Indicates whether the IBAN belongs to a country participating in the Single Euro Payments Area (SEPA) |
data.country.swiftOfficial |
boolean |
Typically indicates whether the IBAN corresponds to an official institution or entity that is part of the SWIFT network, which facilitates international financial transactions. |
data.country |
object |
— |
data.bank |
object|null |
The bank identified from the IBAN's national bank code (Saudi Arabia, UAE, Kuwait, Bahrain, Qatar, Jordan); null when unknown or the IBAN is invalid. |
data.bank.code |
string |
National bank code. |
data.bank.name |
string |
Bank name in English. |
data.bank.nameAr |
string |
Bank name in Arabic. |
data.bank.swift |
string|null |
SWIFT/BIC of the bank. |
data.bank.mergedInto |
string|null |
Set when the bank has merged into another one. |
data.custom_rules_applied.total |
integer |
The total number of custom rules applied to this request. |
data.custom_rules_applied.rules.id |
string |
The rule ID as shown in the dashboard (e.g: CR104).
|
data.custom_rules_applied.rules.title |
string |
The rule title you set when creating the rule. |
data.custom_rules_applied.rules |
object |
The custom rules applied to this request, learn more. |
data.custom_rules_applied |
object |
The custom rules applied to this request, learn more. |
data.status |
string |
The response status. Expected values: success, or error.
|
data.executionTime |
integer |
Time spent in milliseconds to process the data. |
data |
object |
— |
Found a mistake? Tell us on the contact page. Contact