IBAN Validation API: Check an IBAN Over REST

IBAN Validation API: Check an IBAN Over REST

An IBAN validation API checks an International Bank Account Number over REST and returns whether it is structurally valid. BankDataStack exposes that as POST https://www.bankdatastack.com/api/v1/iban/validate with header X-API-Key and JSON {"iban":"GB82WEST12345698765432"}. That IBAN is the official homepage / quick-start example (UK WEST).

Docs: bankdatastack.com/docs (ISO 13616, MOD-97 checksum, 89+ countries including SEPA). Starter is $49.99/mo (1,000 requests, then $0.002; 60 req/min) with a 7-day trial on every plan.

Request: validate a UK WEST IBAN

curl -X POST https://www.bankdatastack.com/api/v1/iban/validate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"iban": "GB82WEST12345698765432"}'

That curl is the official docs / homepage example. Spaces are stripped and the value is uppercased before the checksum runs. Length must be 15–34 characters.

Response: official /docs sample

Official example from /docs (not a live bank-name or BIC lookup — those fields are not in this payload):

{
"status": "success",
"data": {
"iban": "GB82WEST12345698765432",
"valid": true,
"countryCode": "GB",
"checkDigits": "82",
"bban": "WEST12345698765432"
}
}

valid is the MOD-97 checksum result. countryCode is the ISO 3166-1 alpha-2 prefix. checkDigits are characters 3–4. bban is the rest of the number. Run the curl with your key for a live check — do not hard-code this fixture as “today’s” result. Format errors return 422; a mathematically invalid checksum returns 400 with "IBAN checksum validation failed. The IBAN is mathematically invalid."

PHP: validate an IBAN

Quick-start PHP on BankDataStack (same X-API-Key as routing). Official example IBAN:

$url = "https://www.bankdatastack.com/api/v1/iban/validate";
$headers = array(
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
);
$data = json_encode(array('iban' => 'GB82WEST12345698765432'));

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

$result = json_decode($response, true);
print_r($result);

Gate payouts on $result['data']['valid']. SWIFT is a separate POST on the same key if you already have a BIC.

Go live

1. Register and start the 7-day trial.

2. Copy X-API-Key from the dashboard (not Bearer, not a query param).

3. POST https://www.bankdatastack.com/api/v1/iban/validate with {"iban":"GB82WEST12345698765432"}

4. Gate payouts on data.valid. Field list: /docs.

FAQ: IBAN validation API

What does this endpoint check?

ISO 13616 format and the MOD-97 checksum. It returns country, check digits, and BBAN. It does not return a bank legal name or a BIC in the documented sample.

Is GB82WEST12345698765432 a real customer account?

No. It is the product’s published UK WEST example. Use it to wire the client; then validate the IBANs your users paste.

Routing numbers vs IBAN?

US ACH/wire is POST /api/v1/routing/validate. IBAN is the international path. Same X-API-Key. See the docs.

Start the 7-day trial and validate GB82WEST12345698765432 →

Ready to get started?

Get your API key and start validating bank data in minutes.

Get API Key

Related posts