API reference
IBAN validation
POST /iban checks an IBAN against ISO 13616 and the SWIFT IBAN Registry: check digits, length, account format, bank and branch codes, SEPA membership.
https://api.qelka.com/v1/ibanCheck an IBAN before you store it or pay to it: you learn whether it is valid, which check failed if it is not, and its country, bank code, branch code and SEPA membership. Each answer costs 1 credit, valid or not; errors and test keys are never billed.
Request
Send the IBAN the way your user typed it. The check runs on our servers from the SWIFT IBAN Registry: the IBAN is never sent to a bank or to any other third party, the result is never cached, and the request log keeps only the first two and last two characters of the IBAN.
ibanstringRequiredGB29NWBK60161331926819) or print (GB29 NWBK 6016 1331 9268 19) format. Spaces, hyphens, lower case and a leading IBAN label are accepted.freshbooleanDefault falsecurl https://api.qelka.com/v1/iban \
--max-time 10 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"iban": "GB29 NWBK 6016 1331 9268 19"}'
const response = await fetch('https://api.qelka.com/v1/iban', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ iban: 'GB29 NWBK 6016 1331 9268 19' }),
signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/iban",
headers={"Authorization": f"Bearer {api_key}"},
json={"iban": "GB29 NWBK 6016 1331 9268 19"},
timeout=10,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/iban');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['iban' => 'GB29 NWBK 6016 1331 9268 19']),
CURLOPT_TIMEOUT => 10,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"iban": "GB29 NWBK 6016 1331 9268 19"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/iban", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 10 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/iban')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ iban: 'GB29 NWBK 6016 1331 9268 19' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 10) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every IBAN gets a 200, valid or not. Read valid first, then reason when it is false.
idstringlkp_ followed by 26 characters.objectstringiban.inputstringiban you sent, without surrounding spaces.validbooleantrue when every check passed.statusstringvalid or invalid.reasonstring or nullinvalid_characters, invalid_format, unsupported_country, invalid_length, invalid_bban or invalid_checksum. null when the IBAN is valid.ibanstring or nullnull when the input holds characters an IBAN cannot have.formatsobject or nullnull when iban is.formats.electronicstringformats.printstringcountryobject or nullnull when the IBAN does not start with a country of the registry.country.codestringGB.country.namestringUnited Kingdom.check_digitsstring or nullbbanstring or nullbank_codestring or nullnull when the length is wrong.branch_codestring or nullnull elsewhere.sepaboolean or nulltrue when the country is in the geographical scope of the SEPA (Single Euro Payments Area) payment schemes.expected_lengthinteger or nullcredits_usedinteger0 with a test key.cachedbooleanfalse: IBAN results are computed on every call.{
"id": "lkp_01M85QF1P2X7R07K1R4CBTZ68G",
"object": "iban",
"input": "GB29 NWBK 6016 1331 9268 19",
"valid": true,
"status": "valid",
"reason": null,
"iban": "GB29NWBK60161331926819",
"formats": {
"electronic": "GB29NWBK60161331926819",
"print": "GB29 NWBK 6016 1331 9268 19"
},
"country": { "code": "GB", "name": "United Kingdom" },
"check_digits": "29",
"bban": "NWBK60161331926819",
"bank_code": "NWBK",
"branch_code": "601613",
"sepa": true,
"expected_length": 22,
"credits_used": 1,
"cached": false
}
Act on the reason
reason |
What it means | What to do |
|---|---|---|
null |
Every check passed. | Store iban and show formats.print to people. |
invalid_characters |
The input holds characters other than letters, digits, spaces and hyphens, such as dots or slashes. | Ask for the IBAN again. |
invalid_format |
It does not start with a two-letter country code and two check digits. | Ask for the IBAN again: it may be a national account number. |
unsupported_country |
The two letters are not a country of the IBAN Registry. The United States, Canada and Australia, for example, do not use IBANs. | Ask for the account details that country uses instead. |
invalid_length |
The length differs from the one registered for the country. | Show expected_length: a character is missing or extra. |
invalid_bban |
The account part does not follow the country's structure, such as a letter where a digit belongs. | Ask the user to check the account part. |
invalid_checksum |
The check digits do not match the rest of the IBAN. | Ask the user to check each character: it is usually a typo. |
A valid IBAN is well formed and its check digits are right. That does not prove the account exists, is open or belongs to the person who gave it: only the bank can confirm that, for instance through a first payment.
How the IBAN is checked
The checks run in this order, and the first one that fails gives the reason:
- Spaces, hyphens and a leading
IBANlabel are removed, and only letters and digits may remain. - The IBAN starts with two letters and two digits.
- The two letters are a country of the IBAN Registry.
- The length is the one registered for that country, from 15 characters in Norway to 33 in Russia.
- The BBAN follows the country's structure, such as
4!a6!n8!nin the United Kingdom: four letters, then six digits, then eight digits. - The check digits are between 02 and 98, and the whole IBAN passes ISO 7064 MOD 97-10: with the first four characters moved to the end and letters turned into numbers (A = 10 to Z = 35), it leaves a remainder of 1 when divided by 97.
The check digits catch any single mistyped character and any swap of two adjacent characters.
Where the formats come from
Country lengths, BBAN structures and bank and branch positions come from release 101 of the IBAN Registry that SWIFT publishes as the registration authority of ISO 13616, 89 countries in all. SEPA membership follows the European Payments Council list of SEPA scheme countries (EPC409-09, version 8.0 of 24 December 2025). Both are listed on the data sources page.
Catch a mistyped IBAN
One wrong check digit makes the IBAN invalid, and the call is billed because the check ran.
curl https://api.qelka.com/v1/iban \
--max-time 10 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"iban": "GB28 NWBK 6016 1331 9268 19"}'
const response = await fetch('https://api.qelka.com/v1/iban', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ iban: 'GB28 NWBK 6016 1331 9268 19' }),
signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/iban",
headers={"Authorization": f"Bearer {api_key}"},
json={"iban": "GB28 NWBK 6016 1331 9268 19"},
timeout=10,
)
result = response.json()
print(result)
{
"id": "lkp_01M87149C0EX8KFM7FH9H0KX9M",
"object": "iban",
"input": "GB28 NWBK 6016 1331 9268 19",
"valid": false,
"status": "invalid",
"reason": "invalid_checksum",
"iban": "GB28NWBK60161331926819",
"formats": {
"electronic": "GB28NWBK60161331926819",
"print": "GB28 NWBK 6016 1331 9268 19"
},
"country": { "code": "GB", "name": "United Kingdom" },
"check_digits": "28",
"bban": "NWBK60161331926819",
"bank_code": "NWBK",
"branch_code": "601613",
"sepa": true,
"expected_length": 22,
"credits_used": 1,
"cached": false
}
Reject a country that does not use IBANs
The United States has no IBAN, so the country check fails: country, sepa and expected_length are null.
curl https://api.qelka.com/v1/iban \
--max-time 10 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"iban": "US12 3456 7890"}'
const response = await fetch('https://api.qelka.com/v1/iban', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ iban: 'US12 3456 7890' }),
signal: AbortSignal.timeout(10_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/iban",
headers={"Authorization": f"Bearer {api_key}"},
json={"iban": "US12 3456 7890"},
timeout=10,
)
result = response.json()
print(result)
{
"id": "lkp_01M8714A99XVJM2TX9CBQDX5KV",
"object": "iban",
"input": "US12 3456 7890",
"valid": false,
"status": "invalid",
"reason": "unsupported_country",
"iban": "US1234567890",
"formats": {
"electronic": "US1234567890",
"print": "US12 3456 7890"
},
"country": null,
"check_digits": "12",
"bban": "34567890",
"bank_code": null,
"branch_code": null,
"sepa": null,
"expected_length": null,
"credits_used": 1,
"cached": false
}
Errors
| Status | Type | When |
|---|---|---|
| 400 | invalid_request | iban is missing, empty or longer than 64 characters, the body is not a JSON object, or it has a field the request table does not list |
| 401 | invalid_api_key | The key is missing, unknown or revoked |
| 402 | insufficient_credits | Your balance is less than 1 credit (live keys only) |
| 403 | forbidden | The key is restricted to other endpoints |
| 405 | invalid_request | The method is not POST |
| 429 | rate_limited | Too many requests: wait Retry-After seconds |
| 500 | internal_error | Unexpected error on our side: retry with backoff |
No error is billed. An invalid IBAN is not an error: it is a 200 with valid: false. Test keys run the same checks and debit nothing.
Related
- IBAN validation API
- Free tool: IBAN validator
- Batch: up to 100 IBANs in one call, each item with
type: "iban" - Bulk: a whole file of IBANs with
type=iban - Errors, Credits, Test mode