Skip to main content

Endpoint

POST https://api.bunny.build/api/v1/iban-validator

Authentication

HeaderRequiredValue
X-API-KeyYesYour API key (bun_...)
Content-TypeYesapplication/json

Overview

Validate International Bank Account Numbers (IBANs) against the official format specification for all participating countries. Returns structural metadata including country, a human-readable formatted IBAN, and the Basic Bank Account Number (BBAN), so you can catch invalid entries before initiating a transfer.

Use cases

  • Pre-validate IBANs before submitting wire transfers
  • Extract country and bank routing data from user-entered IBANs
  • Block invalid IBAN entries in payment forms in real time
  • Compliance checks for cross-border payment flows

Details

Validates structure and check digits for all IBAN-participating countries. Note that structural validity does not guarantee the account exists; it confirms the number is correctly formed.

Request body

FieldTypeRequiredDescription
ibanstringYesIBAN to validate (spaces are ignored)

Example

{
  "iban": "DE89370400440532013000"
}

Response

200 OK

FieldTypeDescription
ibanstringNormalized IBAN (uppercased, spaces stripped)
validbooleanWhether the IBAN is structurally valid
formattedstringIBAN grouped in blocks of four (e.g. DE89 3704 0044 0532 0130 00). Present only when valid.
countrystringISO 3166-1 alpha-2 country code. Present only when valid.
bbanstringBasic Bank Account Number (everything after the 4-char IBAN prefix). Present only when valid.
errorstringHuman-readable reason for failure. Present only when invalid.
Example (valid)
{
  "iban": "DE89370400440532013000",
  "valid": true,
  "formatted": "DE89 3704 0044 0532 0130 00",
  "country": "DE",
  "bban": "370400440532013000"
}
Example (invalid)
{
  "iban": "DE00370400440532013000",
  "valid": false,
  "error": "Checksum failed"
}

401 Unauthorized

{
  "detail": "Missing API key. Include X-API-Key header."
}

402 Payment Required

{
  "detail": "Monthly quota exceeded. Upgrade your plan."
}

422 Unprocessable Entity

{
  "detail": "Invalid IBAN format or check digit mismatch"
}

429 Too Many Requests

{
  "detail": "Rate limit exceeded. Try again in 60 seconds."
}

cURL example

curl -X POST https://api.bunny.build/api/v1/iban-validator \
  -H "X-API-Key: bun_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"iban": "DE89370400440532013000"}'