Business
Brazil Database Validation: Verify a CPF Against Official Records
Didit Database Validation checks a CPF, name and date of birth against Brazil's official records through the <code>bra_cpf</code> service and returns <code>full_match</code>, <code>partial_match</code> or <code>no_match</code>.

Contents
In this guide
Jump to the part you need.
Database Validation fits teams that must confirm a Brazilian CPF and identity data against the official record before approving an account or payout. Didit queries Receita Federal (SERPRO) through the bra_cpf service and returns a per-field match from one API call. The Brazilian rate is variable and set per service, so check the per-service pricing table before deployment. The caveat: a match indicates the submitted details agree with the registry record; it does not establish possession or liveness.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Item | Detail |
|---|---|
| What it checks | CPF number, first name, last name and date of birth against the authoritative Brazilian source |
| Source | Receita Federal (SERPRO), reached through the bra_cpf service |
| Endpoint | POST https://verification.didit.me/v3/database-validation/, multipart form data, x-api-key header |
| Also available as | A DATABASE_VALIDATION step inside a Didit workflow, read from the session decision |
| Result | match_type of full_match, partial_match or no_match, plus a per-field validations[] array |
| Price | Variable, set per service and billed per successful service hit. The catalog starts at $0.05 per check. No single Brazil rate is published in the summary feed; read the Brazilian service line in the per-service pricing table before you quote. |
| Coverage | 60+ live countries on the Database Validation API, each with its own named services |
| Best for | Fintechs and marketplaces onboarding Brazilian users who need registry evidence stored on the file |
Start free in the sandbox at business.didit.me, no sales call. For developers, connect Didit to an AI assistant through the Didit MCP server. The reference for this check is Database Validation, the published module rates sit on the Didit pricing page, and the per-service Database Validation rates sit in the docs pricing table.

What a Brazilian registry check proves, and what it does not
Database Validation compares the identity data a user supplies with the authoritative source that issued it, rather than with a photographed document. A document capture step reads what is printed on a card. The registry lookup checks whether the CPF exists in the Receita Federal (SERPRO) record and whether the submitted name and date of birth agree with that record. That is a different evidence line: it tests the data against the source, not the physical document.
That is why we recommend running database validation as a separate evidence line, not as a replacement for the rest of the flow. It produces a data match: the details the user gave agree with a record held by the source that was queried.
A data match alone does not prove that the person sitting at the keyboard owns the CPF. It does not prove liveness, and it does not replace document authenticity checks. Pair it with passive liveness and face match as their own workflow steps when account takeover is a live risk, and with the per-feature report when your reviewers need the record details behind a decision.
For routing, use a short rule set tied to the three outcomes. full_match can continue to your standard approval path. partial_match goes to manual review with matched_fields attached. no_match follows your documented synthetic-identity policy. The workflow's partial-match and no-match actions decide the session status.

Prerequisites
- A Didit account created at business.didit.me. The sandbox is free and unlimited, and no sales call is involved.
- An API key from the Business Console. Every standalone Database Validation call authenticates with the
x-api-keyheader. - The data points the Brazilian service expects:
issuing_state=BRA, the CPF inidentification_number,first_name,last_nameanddate_of_birthin ISO format. - A decision on the route. Use the standalone API when you already hold the identity data server to server. Use a workflow when the user will type or scan their own data, because fields are fed automatically from the steps in front of the validation node.
- Consent, where the service requires it. Services flagged
requires_consent=truein the catalog return HTTP 400 unless you sendconsent=true.
Step by step: validate a CPF with the standalone API
- Sign in to the Business Console and stay in the sandbox application while you build. Sandbox testing is free on every plan.
- Copy an API key from the console and store it as an environment variable. The example below reads it as
DIDIT_API_KEY. - Assemble the request body. Send
issuing_state=BRA, the CPF inidentification_number, plusfirst_name,last_nameanddate_of_birth. Addvendor_datawith your own user identifier so the response joins back to your records. - Send the request as multipart form data. This is the documented curl example for a Brazilian CPF:
curl -X POST "https://verification.didit.me/v3/database-validation/" -H "x-api-key: $DIDIT_API_KEY" -F "issuing_state=BRA" -F "identification_number=00000000191" -F "first_name=Jane" -F "last_name=Doe" -F "date_of_birth=1990-01-15" -F "vendor_data=user-1234"The CPF in that example is the placeholder used in the documentation. Replace it with the value your user supplied, and never log the raw number in application logs you do not control.
- Choose the services. Omit
servicesand Didit runs the country default. Passbra_cpfto pin the Receita Federal (SERPRO) service, and list several services if you want more than one source checked. Billing is per successful service hit, so a multi-service request can produce multiple usage events. - Read
match_typefirst, then the per-fieldvalidations[]array. The field list shows you which ofidentification_number,first_name,last_nameanddate_of_birthagreed with the registry record. - Route the outcome.
full_matchcan be approved automatically.partial_matchshould go to review.no_matchshould route according to your documented policy, with a note on the file. - If you took the workflow route instead: add the
DATABASE_VALIDATIONfeature to the workflow in the console or throughPOST /v3/workflows/, create a session withPOST /v3/session/, opensession.urlfor the user, then read the result atGET /v3/session/{sessionId}/decision/in thedatabase_validations[]array, or subscribe tosession.status.updated.
Expected response
The call returns a request wrapper and one validation object. Field names and the match_type enum below are the documented contract; the values shown are placeholders for a clean full match.
{ "request_id": "...", "database_validation": { "match_type": "full_match", "services_used": ["bra_cpf"], "validations": [ { "service": "bra_cpf", "matched_fields": ["identification_number", "first_name", "last_name", "date_of_birth"], "record_details": { "...": "returned when the source provides it" } } ], "warnings": [] }}Alongside those fields the payload carries validation_type, a match_score for the aggregate result, a status per service and a warnings[] array. Expect risk codes such as DATABASE_VALIDATION_NO_MATCH, DATABASE_VALIDATION_PARTIAL_MATCH and COULD_NOT_PERFORM_DATABASE_VALIDATION. Biometric outcomes, where a source supports them, surface through the per-service outcome_code instead. The full catalogue sits in the warnings reference.
Failure cases and recovery
| Signal | What it means | Recovery |
|---|---|---|
| HTTP 400 | The service id is not eligible for that issuing_state, a required field is missing, or a pay-as-you-go service needs consent. | Fix the request. Resend with consent=true when the catalog marks the service as requiring consent. |
HTTP 502 with validation_errors[] | Every selected upstream service failed. The request is not billed and a COULD_NOT_PERFORM_DATABASE_VALIDATION log is written. | Retry later, or fall back to OCR-only so the user is not blocked by an upstream outage. |
match_type is no_match | The record is not in the registry at all. | Treat as synthetic identity per your policy. Do not auto-approve on a later field edit without a new check. |
match_type is partial_match | Some fields agree and others do not, for example the date of birth matches and the name does not. | Route to manual review and keep the matched_fields list with the decision. |
database_validations is null on a session | The configured validation produced no result. | Read database_validation_not_performed_reason on the decision before you retry. |
Inputs and outputs
| Field | Direction | What it carries |
|---|---|---|
issuing_state | Input | ISO alpha-3 country code. Use BRA. |
identification_number | Input | The universal identifier. For Brazil it is the CPF; Didit maps the field per country. |
first_name, last_name | Input | The names the user declared. |
date_of_birth | Input | ISO 8601 date, for example 1990-01-15. |
vendor_data | Input | Your own user identifier, echoed back so you can join the result to your records. |
services | Input | Optional. Omit it for the country default, or pass bra_cpf to choose the service. |
consent | Input | true for services flagged as requiring consent in the catalog. |
match_type | Output | full_match, partial_match or no_match. |
validations[] | Output | One entry per service with status, matched_fields and record_details when the source returns them. |
match_score | Output | The aggregate score for the request. |
warnings[] | Output | Risk codes for a partial match, a no match, or a check that could not be performed. |
What you pay for, and where review starts
- Billing is per successful service hit. Multi-service requests can produce multiple usage events, so a request that runs two services is two lines of usage.
- A 502 where every upstream service failed is not billed, and the failed attempt is logged as
COULD_NOT_PERFORM_DATABASE_VALIDATION. - Some no-match lookups and retries are billable. The billing rules on the docs pricing page list them, so check before you build automatic retries around the call.
- The full ID check line at $0.33 does not include Database Validation. That bundle is the ID document at $0.15, passive liveness at $0.10, face match at $0.05 and device and IP analysis at $0.03. The registry lookup is a separate, country-specific line.
- A session routed to review remains In Review until a reviewer decides.

Worked cost example
Take 1,000 Brazilian sign-ups where each user completes a full ID check, one AML screening and receives an SMS code. This example excludes Database Validation because the Brazilian rate is variable and billed per successful service hit. Every other number is a published list price on November 26, 2026.
| Line | Arithmetic | Total |
|---|---|---|
| ID document | $0.15 x 1,000 | $150.00 |
| Passive liveness | $0.10 x 1,000 | $100.00 |
| Face match 1:1 | $0.05 x 1,000 | $50.00 |
| Device and IP analysis | $0.03 x 1,000 | $30.00 |
| KYC subtotal | $150.00 + $100.00 + $50.00 + $30.00 | $330.00 |
| AML screening | $0.20 x 1,000 | $200.00 |
| Brazil SMS code | $0.052 x 1,000 | $52.00 |
| Total before database validation | $330.00 + $200.00 + $52.00 | $582.00 |
Database Validation is added on top, because the rate is set per service. Read the Brazilian line in the per-service pricing table and multiply that rate by the number of successful service hits. Two services run on the same request means two hits per user.
On the Scale plan, every Didit-priced line is 10% lower: ($330.00 + $200.00) x 0.90 = $477.00. The SMS line splits into a carrier charge that passes through at cost plus a Didit fee of $0.02 per code, and only the fee takes the discount, so the fee falls to $0.018 per code.
Sources
- Didit docs: Database Validation API
- Didit docs: per-service Database Validation pricing
- Didit docs: Database Validation warnings
- Didit docs: Database Validation report
- Didit docs: Database Validation outcome codes
- Didit docs: ID Verification methods and assurance tiers
- Didit docs: configure ID Verification methods in the console
- Didit docs: Create Session API
- Didit docs: Retrieve Session decision API
- Didit docs: data models
- Didit docs: pricing and billing rules
- Didit pricing page and pricing.json, read November 26, 2026
- Didit MCP server
Next step: open the sandbox at business.didit.me, copy an API key, and run the curl example against a test CPF. No sales call, no procurement cycle.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
What is database validation for Brazil?
Database Validation is a Didit check that compares the identity data a user supplies with the authoritative source that issued it, rather than with a photographed document. For Brazil it queries Receita Federal (SERPRO) through the bra_cpf service and returns a match_type plus per-field results. You can call it as a standalone API or run it as a step inside a Didit workflow.
Does Didit check a CPF against the Receita Federal?
Yes. The bra_cpf service sends the CPF, first name, last name and date of birth to Receita Federal (SERPRO) and returns which of those fields matched. You pass issuing_state=BRA and put the CPF in identification_number, and Didit maps that universal field to the CPF format for the country.
How much does a Brazilian CPF check cost?
Database Validation is priced per service, not per country, so the Brazilian rate is the one listed for the Brazilian service in the per-service pricing table. No single Brazil rate is published in the summary feed, and each successful service hit is billed, so a request that runs two services produces two usage events. A 502 where every upstream service failed is not billed.
What do full_match, partial_match and no_match mean?
full_match means every checked field agrees with the registry record. partial_match means some fields agree and others do not, for example the date of birth matches and the name does not. no_match means the record is not in the registry, which is the pattern you see with fabricated or reused identity data.
Do I need a document photo to validate a CPF?
No. The standalone API takes data you already hold on your side. In a workflow the fields are fed automatically from the steps in front of the validation node, such as ID Verification, Document AI or a questionnaire, and an ID Verification step is not required. The docs do not list Brazil among the portrait-backed sources, so if you need proof that the person owns the CPF, add passive liveness and face match as their own steps.
Is database validation enough for KYC in Brazil?
It is one evidence component, not the whole file. Use it with document verification, liveness and face match where your risk assessment and applicable policy call for them. Route the result under your documented policy.
What happens when the registry lookup fails technically?
An HTTP 502 with a validation_errors[] array means every selected upstream service failed. That request is not billed, Didit writes a COULD_NOT_PERFORM_DATABASE_VALIDATION log, and you should retry later or fall back to OCR-only. An HTTP 400 means the request itself is wrong: an ineligible service for the country, a missing field, or missing consent.
Does Didit need consent for the Brazilian check?
Some services in the catalog are flagged requires_consent=true, and those return HTTP 400 unless you send consent=true. Check the service entry for the country you plan to call before you ship. The catalog, not the marketing page, is the source of truth for which services carry that flag.
Can I run the CPF check inside a workflow with the rest of the KYC steps?
Yes. Add the DATABASE_VALIDATION feature to a workflow, create a session with POST /v3/session/, and read the decision at GET /v3/session/{sessionId}/decision/, where the results arrive in the database_validations[] array. Fields are filled from the steps in front of it, so users do not retype their CPF, and the session status is driven by the actions you configured for partial and no matches.
What does a partial match do to the session status?
The partial-match action you configure on the workflow decides. The session status becomes Approved, In Review or Declined according to that setting, and a session routed to review waits for a reviewer. A session routed to review remains In Review until a reviewer decides.
Can a coding agent integrate this for me?
Yes. Didit publishes an integration prompt that covers Database Validation end to end, including both the session route and the standalone API route, at didit.me/developers/integration-prompt. You can also connect Didit to an AI assistant through the MCP server hosted at mcp.didit.me.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


