Compliance

BSN & IBAN Validator

BSN validation API and IBAN check API for the Netherlands — mathematical validation via elfproef and MOD-97. No external calls, blazing fast.

GET /v1/compliance/validate-finance

Validates a Dutch BSN (Burger Service Nummer) or IBAN using pure mathematics. No external APIs are called — validation is instantaneous and runs entirely in-process.

Use this endpoint to:

  • Pre-screen user input before submitting to government portals
  • Reject obviously invalid numbers before storing them
  • Comply with KYC/AML input validation requirements

Request parameters

ParameterTypeRequiredDescription
type"bsn" | "iban"The type of number to validate
numberstringThe raw number (spaces, dashes, and country prefix accepted)

Example request — BSN

curl -H "X-API-Key: YOUR_KEY" \
  "https://api.omnizoek.nl/v1/compliance/validate-finance?type=bsn&number=111222333"

Example response — BSN valid

{
  "valid": true,
  "type": "bsn",
  "number": "111222333",
  "algorithm": "elfproef",
  "detail": "BSN passed the elfproef (11-check)"
}

Example request — IBAN

curl -H "X-API-Key: YOUR_KEY" \
  "https://api.omnizoek.nl/v1/compliance/validate-finance?type=iban&number=NL91+ABNA+0417+1643+00"

Example response — IBAN valid

{
  "valid": true,
  "type": "iban",
  "number": "NL91ABNA0417164300",
  "algorithm": "mod97",
  "detail": "IBAN passed MOD-97-10 check"
}

Example response — invalid

{
  "valid": false,
  "type": "bsn",
  "number": "123456789",
  "algorithm": "elfproef",
  "detail": "BSN failed the elfproef (expected remainder 0, got 7)"
}

Response fields

FieldTypeDescription
validbooleantrue if the number passes its algorithm
type"bsn" | "iban"The type as provided
numberstringNormalised number (stripped of spaces/dashes)
algorithmstringThe algorithm used: elfproef or mod97
detailstringHuman-readable explanation of the result

How the algorithms work

BSN — elfproef (11-check)

The BSN uses a weighted sum with position weights 9 8 7 6 5 4 3 2 −1. Each digit is multiplied by its weight; the sum must be divisible by 11.

weights = [9, 8, 7, 6, 5, 4, 3, 2, -1]
sum(weights[i] * digit[i] for i in 0..8) % 11 == 0

IBAN — MOD-97-10

  1. Move the four leading characters (country code + check digits) to the end
  2. Replace each letter with digits: A=10, B=11, … Z=35
  3. Interpret the resulting string as an integer
  4. The number must satisfy $n \mod 97 = 1$

Error responses

StatusCause
422type is not bsn or iban
422number is empty or too long

Caching

This endpoint does not cache — every request is computed on the fly (microseconds).

On this page