Financiar v1 / Validare
IBAN validation
Checks an IBAN against ISO 13616 (structure, per-country length, mod-97 check digits) and, for Romanian IBANs, identifies the issuing bank.
A wrong IBAN is NOT a request error: the response is 200 with valid: false and a code in motiv saying what is wrong — form, length or check digits.
POST
https://oneapi.ro/api/financiar/v1/validare/iban
Request body
Sent as JSON in the request body (Content-Type: application/json) — not in the query string.
NameTypeDescriptionAccepted values
ibanrequired
string
Required, in the request body. With or without spaces/hyphens, upper or lower case.
max 42 car.
Romanian IBAN
Request body
{
"iban": "RO49AAAA1B31007593840000"
}
A German IBAN
Request body
{
"iban": "DE89370400440532013000"
}
Written with spaces and lowercase
Request body
{
"iban": "ro49 aaaa 1b31 0075 9384 0000"
}
Wrong check digits
Request body
{
"iban": "RO49AAAA1B31007593840001"
}
Query parameters
This route accepts no query parameters.
How it behaves
- Validates an IBAN against ISO 13616: structure, per-country length and the mod-97 check digits. For Romanian IBANs it also identifies the issuing bank.
- Any usual formatting is accepted: grouping spaces, hyphens, lowercase. The response returns the canonical form in
iban. - A wrong IBAN is not a bad request. The response is 200 with
valid: falseand a code inmotivsaying what is wrong:forma_invalida,lungime_gresita(withlungime_asteptata) orcontrol_invalid. An unexplained "invalid" helps nobody who transposed two digits. - The method is
POST, notGET, because an IBAN identifies someone's account and a query string ends up in access logs, in telemetry and in browser history. - The bank is only reported when the code belongs to a confirmed credit institution. The BIC register we start from holds 76 Romanian entities, 50 of which are not banks: a brewery, the Stock Exchange, brokerage houses. An IBAN built on such a code cannot exist, so the answer is
motiv_banca: "nu_e_institutie_de_credit"rather than the entity name. The name appears separately, inentitate_cu_acest_cod, as a debugging aid. - Bank identification works for Romania only: complete BIC/SWIFT directories are licensed and we do not use them. For foreign IBANs
motiv_bancaisdoar_pentru_romania— a declared limit, not an unexplainednull. - Coverage: 26 confirmed credit institutions, including branches of foreign banks (ING, Citibank, Revolut, BNP Paribas). Those have no LEI of their own, only the parent company's, so they are confirmed by name matching against the NBR register.
What it is for
- Validating an IBAN in a form before storing it.
- Identifying the bank for display or payment routing.
- Debugging a mistyped IBAN.
Response structure
FieldTypeDescription
data[]
object[]
meta.temei
string
The legal basis for the values or for the way they are computed.
meta.sursa_banci
string
meta.nota
string
A note on how to read the response — a pitfall, a convention or a limit of the source.
data.iban
string
Canonical form: uppercase, no spaces.
data.valid
boolean
The ISO 13616 verification result.
data.motiv
null
The defect code when
valid is false; null otherwise.
data.lungime_asteptata
integer
The official length for that country.
null for countries outside the table, where only the mod-97 check remains.
data.cod_banca
string
The four letters after the check digits, for Romanian IBANs.
data.banca
null
The credit institution: name from the NBR register, BIC, tax code, LEI and status.
null when it cannot be identified.
data[].banca.tip
institutie_credit or trezoreria_statului — the TREZ code of State Treasury accounts, where cui, lei and stare are null.
data.motiv_banca
string
Why the bank is missing:
doar_pentru_romania, cod_necunoscut, nu_e_institutie_de_credit.
data[].entitate_cu_acest_cod
Present only with
nu_e_institutie_de_credit: which entity holds the code, as a debugging aid.
Response examples
body: {"iban": "RO49AAAA1B31007593840000"}
POSThttps://oneapi.ro/api/financiar/v1/validare/iban
{
"data": {
"iban": "RO49AAAA1B31007593840000",
"valid": true,
"tara": "RO",
"lungime": 24,
"lungime_asteptata": 24,
"motiv": null,
"cod_banca": "AAAA",
"banca": null,
"motiv_banca": "cod_necunoscut"
},
"meta": {
"temei": "ISO 13616; control mod-97 calculat pe bucăţi.",
"sursa_banci": "GLEIF (mapare BIC↔LEI, licenţă CC0) + registrul BNR al instituţiilor de credit; codul `TREZ` al Trezoreriei Statului e ţinut local.",
"nota": "IBAN valid ca structură, dar codul de bancă nu apare în registru. Verifică transcrierea: cifrele de control nu prind o literă greşită în codul băncii dacă rezultatul rămâne divizibil."
}
}
body: {"iban": "DE89370400440532013000"}
POSThttps://oneapi.ro/api/financiar/v1/validare/iban
{
"data": {
"iban": "DE89370400440532013000",
"valid": true,
"tara": "DE",
"lungime": 22,
"lungime_asteptata": 22,
"motiv": null,
"cod_banca": null,
"banca": null,
"motiv_banca": "doar_pentru_romania"
},
"meta": {
"temei": "ISO 13616; control mod-97 calculat pe bucăţi.",
"sursa_banci": "GLEIF (mapare BIC↔LEI, licenţă CC0) + registrul BNR al instituţiilor de credit; codul `TREZ` al Trezoreriei Statului e ţinut local.",
"nota": "IBAN valid. Identificarea băncii e disponibilă doar pentru IBAN-urile româneşti: directoarele BIC/SWIFT complete sunt licenţiate şi nu le folosim."
}
}
body: {"iban": "ro49 aaaa 1b31 0075 9384 0000"}
POSThttps://oneapi.ro/api/financiar/v1/validare/iban
{
"data": {
"iban": "RO49AAAA1B31007593840000",
"valid": true,
"tara": "RO",
"lungime": 24,
"lungime_asteptata": 24,
"motiv": null,
"cod_banca": "AAAA",
"banca": null,
"motiv_banca": "cod_necunoscut"
},
"meta": {
"temei": "ISO 13616; control mod-97 calculat pe bucăţi.",
"sursa_banci": "GLEIF (mapare BIC↔LEI, licenţă CC0) + registrul BNR al instituţiilor de credit; codul `TREZ` al Trezoreriei Statului e ţinut local.",
"nota": "IBAN valid ca structură, dar codul de bancă nu apare în registru. Verifică transcrierea: cifrele de control nu prind o literă greşită în codul băncii dacă rezultatul rămâne divizibil."
}
}
body: {"iban": "RO49AAAA1B31007593840001"}
POSThttps://oneapi.ro/api/financiar/v1/validare/iban
{
"data": {
"iban": "RO49AAAA1B31007593840001",
"valid": false,
"tara": "RO",
"lungime": 24,
"lungime_asteptata": 24,
"motiv": "control_invalid",
"cod_banca": null,
"banca": null,
"motiv_banca": null
},
"meta": {
"temei": "ISO 13616; control mod-97 calculat pe bucăţi.",
"sursa_banci": "GLEIF (mapare BIC↔LEI, licenţă CC0) + registrul BNR al instituţiilor de credit; codul `TREZ` al Trezoreriei Statului e ţinut local.",
"nota": "Structura e corectă, dar cifrele de control nu se verifică — semn tipic de cifre inversate sau de un caracter greşit."
}
}
Error codes
| Code | Slug | When it occurs |
|---|---|---|
| 401 | neautentificat | Token missing, invalid, expired or revoked. |
| 403 | feature_indisponibil | The current plan does not include the feature the route depends on. |
| 422 | validare | iban missing or of an impossible length. An IBAN that is present but wrong returns 200 with valid: false. |
| 429 | cota_depasita | The plan's monthly quota has been exceeded (see Retry-After). |
All errors share the same shape. eroare.cod is stable and is the value you should branch on in code — not the text in mesaj, which may change.
{
"eroare": {
"cod": "validare",
"mesaj": "iban missing or of an impossible length. An IBAN that is present but wrong returns 200 with valid: false."
}
}