Validação de contas bancárias em loteBETAcore beta
Valide CBU, CVU, CLABE, CCI e IBAN com checksum por país e resolução de nome do banco. Até 1.000 contas por request.
Contrato estável; mudanças breaking apenas com deprecation prévio.
Validate a batch of bank account identifiers. Each item declares its `country` (required) and optionally a `type` ∈ {cbu, cvu, clabe, cci, iban} — when omitted it is detected from the country and format. Verifies the right checksum per format: CBU (block Mod-10), CVU (same checksum, different prefix), CLABE (Banxico weighted digit), CCI (Peru), IBAN (Mod 97-10). Resolves `bank_code → bank_name` from official registries. Each result carries `valid`, `checksum_valid` and the resolved `bank_name` when available. Up to 1000 accounts per request.
URL base: https://api.normadata.io
Header de autenticação: X-API-Key: nd-...
Corpo da requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| items | array | sim | Array of items to validate (1–1000). Each item is the object described below. |
| items[].id | string | não | Client-provided correlation id, echoed back verbatim in the matching result. |
| items[].value | string | sim | Account number to validate (with or without separators). |
| items[].country | string | sim | ISO 3166-1 alpha-2 country code. |
| items[].type | string | não | Account type ∈ {cbu, cvu, clabe, cci, iban}. If omitted, detected from country + format. |
Exemplo de requisição
cURLcurl -X POST https://api.normadata.io/v1/validate/accounts \
-H "X-API-Key: nd_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{"items":[
{"id":"1","value":"0170010600000123456780","country":"AR","type":"cbu"},
{"id":"2","value":"DE89370400440532013000","country":"DE","type":"iban"}
]}'package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
type AccountItem struct {
ID string `json:"id"`
Value string `json:"value"`
Country string `json:"country"`
Type string `json:"type,omitempty"`
}
type AccountResult struct {
ID string `json:"id"`
Country string `json:"country"`
Type string `json:"type"`
Valid bool `json:"valid"`
ChecksumValid bool `json:"checksum_valid"`
BankName string `json:"bank_name"`
}
type AccountResponse struct {
Results []AccountResult `json:"results"`
}
func main() {
body, _ := json.Marshal(map[string][]AccountItem{
"items": {
{ID: "1", Value: "0170010600000123456780", Country: "AR", Type: "cbu"},
{ID: "2", Value: "DE89370400440532013000", Country: "DE", Type: "iban"},
},
})
req, _ := http.NewRequest("POST", "https://api.normadata.io/v1/validate/accounts", bytes.NewReader(body))
req.Header.Set("X-API-Key", os.Getenv("NORMADATA_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
var out AccountResponse
json.NewDecoder(res.Body).Decode(&out)
for _, r := range out.Results {
fmt.Println(r.ID, r.Valid, r.ChecksumValid, r.BankName)
}
}Exemplo de resposta 200
JSON{
"results": [
{
"id": "1",
"country": "AR",
"type": "cbu",
"valid": true,
"checksum_valid": true,
"bank_name": "Galicia"
},
{
"id": "2",
"country": "DE",
"type": "iban",
"valid": true,
"checksum_valid": true
}
]
}Erros comuns
Códigos de erro que você pode encontrar ao chamar este endpoint. O envelope completo está documentado na referência principal.
| Código |
|---|
| INVALID_ACCOUNT |
| MISSING_VALUE |
| MISSING_COUNTRY |
| INVALID_COUNTRY |
| empty_batch |
| batch_too_large |
| quota_exceeded |
Notas
Validates that the number is well-formed and belongs to a real bank — it does not confirm the account is open or who owns it, and never runs a test transfer. Separators (spaces, dashes, dots) are stripped; letters are uppercased for IBAN. CBU/CVU use the block Mod-10 checksum; CLABE uses the Banxico weighted digit. The envelope is shared by every endpoint: POST `{items:[…]}` (1–1000) → `{results:[…]}` correlated by `id`.
Endpoints relacionados
Use este endpoint em acesso antecipado
O acesso à Normadata é provisionado manualmente. Solicite acesso com seu caso de uso e provisionamos a API key para sua conta.
Solicitar acesso →