Skip to main content

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>.

Brazil Database Validation: Verify a CPF Against Official Records

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.

Database Validation for Brazil at a glance
ItemDetail
What it checksCPF number, first name, last name and date of birth against the authoritative Brazilian source
SourceReceita Federal (SERPRO), reached through the bra_cpf service
EndpointPOST https://verification.didit.me/v3/database-validation/, multipart form data, x-api-key header
Also available asA DATABASE_VALIDATION step inside a Didit workflow, read from the session decision
Resultmatch_type of full_match, partial_match or no_match, plus a per-field validations[] array
PriceVariable, 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.
Coverage60+ live countries on the Database Validation API, each with its own named services
Best forFintechs 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.

A session detail view in the Didit Business Console focused on the ID document check
The ID document step can sit in front of Database Validation in a workflow, so the lookup receives parsed identity data.

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.

A session detail view in the Didit Business Console focused on the liveness check
Liveness and face match are separate checks. A registry match does not replace them when you need evidence that the person is present.

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-key header.
  • The data points the Brazilian service expects: issuing_state=BRA, the CPF in identification_number, first_name, last_name and date_of_birth in 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=true in the catalog return HTTP 400 unless you send consent=true.

Step by step: validate a CPF with the standalone API

  1. Sign in to the Business Console and stay in the sandbox application while you build. Sandbox testing is free on every plan.
  2. Copy an API key from the console and store it as an environment variable. The example below reads it as DIDIT_API_KEY.
  3. Assemble the request body. Send issuing_state=BRA, the CPF in identification_number, plus first_name, last_name and date_of_birth. Add vendor_data with your own user identifier so the response joins back to your records.
  4. 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.

  1. Choose the services. Omit services and Didit runs the country default. Pass bra_cpf to 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.
  2. Read match_type first, then the per-field validations[] array. The field list shows you which of identification_number, first_name, last_name and date_of_birth agreed with the registry record.
  3. Route the outcome. full_match can be approved automatically. partial_match should go to review. no_match should route according to your documented policy, with a note on the file.
  4. If you took the workflow route instead: add the DATABASE_VALIDATION feature to the workflow in the console or through POST /v3/workflows/, create a session with POST /v3/session/, open session.url for the user, then read the result at GET /v3/session/{sessionId}/decision/ in the database_validations[] array, or subscribe to session.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

What can go wrong on a Brazilian registry call
SignalWhat it meansRecovery
HTTP 400The 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_matchThe 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_matchSome 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 sessionThe configured validation produced no result.Read database_validation_not_performed_reason on the decision before you retry.

Inputs and outputs

Fields you send and fields you read back
FieldDirectionWhat it carries
issuing_stateInputISO alpha-3 country code. Use BRA.
identification_numberInputThe universal identifier. For Brazil it is the CPF; Didit maps the field per country.
first_name, last_nameInputThe names the user declared.
date_of_birthInputISO 8601 date, for example 1990-01-15.
vendor_dataInputYour own user identifier, echoed back so you can join the result to your records.
servicesInputOptional. Omit it for the country default, or pass bra_cpf to choose the service.
consentInputtrue for services flagged as requiring consent in the catalog.
match_typeOutputfull_match, partial_match or no_match.
validations[]OutputOne entry per service with status, matched_fields and record_details when the source returns them.
match_scoreOutputThe aggregate score for the request.
warnings[]OutputRisk 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.
A session detail view in the Didit Business Console focused on AML screening
AML screening is a separate check and a separate price line from Database Validation.

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.

Cost of 1,000 Brazilian onboardings at list price, excluding Database Validation
LineArithmeticTotal
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

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.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

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.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • 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.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • 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.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.