BlogData

An IBAN check isn't an account check

IBAN validation checks the format and checksum. It gives you a clean number to work with, without claiming the account exists.

An IBAN copied from a document often arrives with spaces. Before an app can do much with it, it needs a consistent representation and a way to check whether the number follows the rules for its country.

That is what Bank does. Pass the number as you have it, and the response gives you the electronic form for storage and the spaced form for display. These are the relevant fields for the standard German example:

POST /bank
Parse-Version: 2.0.0
Content-Type: application/json

{"iban":"DE89 3704 0044 0532 0130 00"}
{
  "iban": "DE89370400440532013000",
  "valid": true,
  "country": "DE",
  "formatted": "DE89 3704 0044 0532 0130 00"
}

valid means the number passes the applicable validation checks: accepted characters, country length, structure, the IBAN checksum, and supported national checks. National checks vary by country; the Bank reference lists the ones available. An unsupported national check is not treated as a failed IBAN.

Passing those rules doesn't mean an account with that number is open, or that it belongs to the person who entered it. Those questions require information a parsing check doesn't have.

The response includes the bank identifier where the country's format defines it. Add "deep": true to the body for checksum digits, branch, and account identifiers, included on every plan. A bank name or BIC can come from an official directory when we have a matching record. That identifies the institution. It doesn't turn the result into an account check.

If the number fails validation, the API returns HTTP 200 with valid: false. Read checks and the ordered issues to distinguish an incorrect length from a checksum failure and show an appropriate message beside the input. Keep the original value so the person can correct it.

HTTP 400 means the request itself needs correcting, such as a numeric iban instead of a string. HTTP 503 means the lookup could not finish. Neither is a completed verdict on the account number. Keeping those cases separate avoids telling someone their IBAN is wrong when the check never reached an answer.