Skip to main content

Mastering National Registry and CPF Validation in Brazil

Validate Brazilian CPF data with a Didit Database Validation call: issuing_state=BRA, the CPF in identification_number, plus name and date of birth. Database Validation is variable per service.

Mastering National Registry and CPF Validation in Brazil

Contents

In this guide

Jump to the part you need.

This guide is for teams that must confirm a Brazilian CPF, and the name and date of birth behind it, before they onboard or pay someone. You post the CPF and details to Didit's Database Validation API and read a per-field match back. Database Validation is variable per service. Read the current rate for bra_cpf in the per-service pricing table. The caveat: a match proves the record exists, not that the person typing it owns it.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Brazil CPF and National Registry validation at a glance
ItemDetail
What you getA per-field verdict on identification number, first name, last name and date of birth, plus an aggregated match_type of full_match, partial_match or no_match
Recommended methodStandalone server-to-server call when you already hold the data; a workflow session with the DATABASE_VALIDATION feature when the user types it
EndpointPOST https://verification.didit.me/v3/database-validation/ with the x-api-key header
Country fieldissuing_state=BRA
Documented Brazil servicebra_cpf
PriceVariable per service. Read the current rate for bra_cpf in the per-service pricing table. Billed per successful service hit
Assurance tierdata_match when the lookup runs as a non-document ID Verification method
Main caveatA data match proves a record exists at the source. Ownership needs a biometric step

You can start free in the sandbox at https://business.didit.me/ with no sales call, and developers can connect Didit to an AI assistant through the MCP server. List prices and plan terms live on https://didit.me/pricing/, and the full method reference is in the Database Validation docs.

The outcome, and the method we recommend

A Brazil check returns two things. First, a per-field verdict: whether the CPF itself matched, whether the first name, last name and date of birth matched, and the record details the source returned. Second, an aggregated match_type of full_match, partial_match or no_match. Branch your policy on the aggregated value and use the per-field detail to explain the decision.

Pick the method by where the data comes from. If your back end already holds the CPF, for example from a signup form, an existing account record or a payment instruction, use the standalone API. It is one call, needs no workflow, and returns the decision in the response. If the end user types the CPF into a Didit flow, add the DATABASE_VALIDATION feature to a workflow and read the decision from the session payload. Both routes call the same service at the same price.

Prerequisites

  • A Didit account and an API key from the Business Console. Signup is self service, with no sales call and no procurement cycle.
  • The CPF as digits, plus first name, last name and date of birth. Send the date as YYYY-MM-DD.
  • issuing_state=BRA on the request. That is how we map the universal identification_number field to the CPF.
  • The service id you intend to call. The documented Brazil service is bra_cpf. Confirm any other Brazil service in the catalog before you enable it, and read its rate in the per-service pricing table.
  • Consent where the service requires it. A service flagged requires_consent=true answers HTTP 400 unless the request carries consent=true.
  • For the session route, a workflow with the DATABASE_VALIDATION feature added in the console or through POST /v3/workflows/.

Step by step: validate a CPF with the standalone API

  1. Take the API key from the console. The endpoint requires the documented x-api-key header.
  2. Confirm the service and its price. Read bra_cpf in the per-service pricing table linked from the Database Validation docs. The list price is set per service, so the Brazil rate is the one to read. Database Validation is variable per service. Read the current rate for bra_cpf in the per-service pricing table.
  3. Send one POST. Use multipart form data to https://verification.didit.me/v3/database-validation/ with the x-api-key header. Omit services to run the country default, or pass services to choose which services run, or several of them.
  4. Read match_type first. It is full_match, partial_match or no_match, and it is what your routing should key on.
  5. Read validations second. Each entry carries service, status, matched_fields and record_details, so you can see which field failed rather than only that something did.
  6. Map the result to a decision. A full match continues. A partial match routes to review. A no match declines under a synthetic-identity policy. In session mode the status is set by the partial-match and no-match actions configured on the workflow.

The runnable example below is the documented Brazil CPF call, unchanged apart from the key being read from your environment:

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"

Expected output

The response carries a request id and one database_validation object. The shape below is the documented schema, with the values your request produces at each key:

{
  "request_id": "<uuid>",
  "database_validation": {
    "match_type": "full_match",
    "validation_type": "<set by the service>",
    "services_used": ["bra_cpf"],
    "match_score": <number>,
    "validations": [
      {
        "service": "bra_cpf",
        "status": "<per-service status>",
        "matched_fields": ["identification_number", "first_name", "last_name", "date_of_birth"],
        "record_details": { "<fields the source returned>" }
      }
    ],
    "warnings": []
  }
}

Two keys deserve your attention. services_used tells you which sources actually answered, which matters when you pass more than one service. warnings carries the risk codes, including DATABASE_VALIDATION_NO_MATCH, DATABASE_VALIDATION_PARTIAL_MATCH and COULD_NOT_PERFORM_DATABASE_VALIDATION, and the full catalogue is on the warnings page.

Session detail for an ID document check in the Didit Business Console
The console records the session, the document step and the warnings, which is where a partial match or an impossible lookup surfaces for review.

CPF validation inside a workflow session

When the CPF comes from the end user, run the lookup as a step instead of a standalone call. The fields are fed into the registry lookup from the steps in front of it, and an ID Verification step is not required.

  1. Add the DATABASE_VALIDATION feature to the workflow in the Business Console or through POST /v3/workflows/. You can pin specific services per country.
  2. Create a session with POST /v3/session/, sending workflow_id, vendor_data and callback.
  3. Send the user to session.url, or mount the Web or Mobile SDK.
  4. Fetch the decision with GET /v3/session/{sessionId}/decision/, or subscribe to session.status.updated.
  5. Read database_validations[] on the decision payload. That array is the decision surface for this feature.
curl -X POST 'https://verification.didit.me/v3/session/' \
-H "x-api-key: $DIDIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow_id": "<workflow uuid>", "vendor_data": "user-1234", "callback": "https://app.example.com/done"}'

Brazil behaves differently from a pure record lookup in one respect worth knowing before you design the flow. In Brazil the source checks the user's selfie against the face on record itself and returns a verdict rather than a portrait. That is not a liveness check, so we normalise the skip_liveness_and_face_match switch off on save, which means any Liveness and Face Match steps in the workflow still run. On a match, Face Match compares the live capture with the selfie the lookup verified. The lookup, the selfie and the verdict all sit inside the lookup price, with no separate Liveness or Face Match charge for the part the source performs.

A user taking a selfie for biometric face match
When the source checks a selfie itself, keep the biometric step in the flow so ownership is tested, not just the record.

Inputs and outputs

Database Validation request fields and response fields for Brazil
KeyDirectionWhat it does
issuing_stateInputSet to BRA. Selects the country whose source is queried
identification_numberInputUniversal field. Didit maps it to the CPF for Brazil, and to the national identifier for other countries
first_name, last_nameInputMatched field by field against the record
date_of_birthInputMatched against the record. Send YYYY-MM-DD
vendor_dataInputYour stable identifier for the person, echoed back for correlation
servicesInputOptional. Omit to run the country default, or pass ["bra_cpf"] to name the service
consentInputRequired as true when the service is flagged requires_consent=true
database_validation.match_typeOutputfull_match, partial_match or no_match
database_validation.match_scoreOutputAggregated score behind the match type
validations[].matched_fieldsOutputThe individual fields that matched
validations[].record_detailsOutputThe record fields the source returned, where it returns them
warnings[]OutputRisk codes such as a no match, a partial match or a lookup that could not run

Failure cases and recovery

What each failure looks like and what to do next
What happenedWhat you seeRecovery
The service is not eligible for the country, or a required field is missingHTTP 400Fix the service id against issuing_state=BRA, or omit services to run the country default. Fill in the field the error names
The service needs consent and the request did not carry itHTTP 400Resend with consent=true
Every selected upstream service failedHTTP 502 with a validation_errors[] arrayThe request is not billed and a COULD_NOT_PERFORM_DATABASE_VALIDATION log is written. Retry later or fall back to document capture
The record is not at the sourcematch_type of no_match, plus a DATABASE_VALIDATION_NO_MATCH warningTreat it as a synthetic identity under your policy. Do not retry the same data
Some fields matched and others did notmatch_type of partial_matchRoute to review, or let the workflow apply the on_partial_match action you configured
The lookup could not run in a sessionA COULD_NOT_PERFORM_DATABASE_VALIDATION warning and a session in reviewCollect the missing data, then run the check again so the session can settle

One more failure class is worth handling even though it never reaches the registry. If a Face Match step follows a method that leaves no photograph, it cannot pass anyone automatically and reports the comparison as not computed with a null score rather than declining. Brazil is not one of those cases because the lookup verifies a selfie, but if you add other countries to the same workflow the workflow editor warns you before you publish.

Billing is per successful service hit. A multi-service Database Validation request is billed once for each service that returns a hit, so asking for several services on one person costs more than asking for one. A request where every upstream service failed is not billed. Our pricing docs also note that some no-match lookups and retries are billable, and that page lists which, so read it before you build an automatic retry loop.

When the lookup runs inside a session alongside document capture and biometrics, those steps bill separately at their own published prices: ID document verification at $0.15 per check, passive liveness at $0.10, face match at $0.05 and device and IP analysis at $0.03. AML screening, if it is in scope for your product, is $0.20 per check.

How Didit billing works with credits, auto-recharge and volume discounts
Billing is per completed check from prepaid credit, with plan discounts applied to Didit prices.

The review boundary is where a person must decide, not the system. A partial match is a judgement about whether a discrepancy is a typo or a fraud signal. A no match is a policy decision about synthetic identity, not something to retry into a pass. A data match proves the record exists; keep a biometric step in the flow when ownership matters for your product.

Worked cost example

Take 10,000 Brazilian users in a month, each going through a full ID check with a CPF lookup attached. All figures below are Didit list prices from the live price feed.

  • ID document verification: 10,000 x $0.15 = $1,500.00
  • Passive liveness: 10,000 x $0.10 = $1,000.00
  • Face match 1:1: 10,000 x $0.05 = $500.00
  • Device and IP analysis: 10,000 x $0.03 = $300.00
  • Subtotal for those four lines: $1,500.00 + $1,000.00 + $500.00 + $300.00 = $3,300.00, which is the same as 10,000 x $0.33 for the full KYC bundle
  • Database Validation for Brazil: 10,000 x the published bra_cpf rate, read from the per-service pricing table. Database Validation is variable per service, so this line stays as 10,000 x that rate

Total for the four KYC lines is $3,300.00, or $0.33 per user, plus 10,000 x the published bra_cpf rate for Database Validation. On the Scale plan the Didit prices carry a 10% discount, so the four KYC lines become 10,000 x $0.297 = $2,970.00, plus 10,000 x the published bra_cpf rate for Database Validation, before any AML. Add AML screening only if your product needs it: 10,000 x $0.20 = $2,000.00 more.

Sources

Next step: open the sandbox at https://business.didit.me/, take an API key from the console, and run the Brazil CPF call above against test data before you point it at production. No sales call is involved.

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

How do I validate a Brazilian CPF with an API?

Send a multipart POST to https://verification.didit.me/v3/database-validation/ with the x-api-key header, issuing_state=BRA, the CPF in identification_number, and the first name, last name and date of birth. We map identification_number to the CPF for Brazil and return a per-field match plus an aggregated match_type. The documented Brazil service id is bra_cpf.

What does a CPF full_match actually prove?

It proves that the CPF and the personal details you sent match a record held by the source that was queried. It does not prove that the person typing those details is the record holder. When the check runs as a non-document ID Verification method, the result carries the assurance tier data_match, which is exactly that claim and no more.

Which field carries the CPF?

identification_number is the universal field. We map it to the CPF, and to RUT, CURP, DNI and other national identifiers, based on issuing_state. For Brazil, set issuing_state to BRA and send the CPF as digits.

Does Didit validate the National Registry as well as the CPF?

The documented Brazil service is bra_cpf, which validates the CPF and the personal details you send. Other Brazil registry services need confirmation in the service catalog and the per-service pricing table before you enable them. Our ID Verification also reads 14,000+ document types across 220+ countries and territories at $0.15 per check, but that is document capture rather than a registry lookup.

How much does a Brazil CPF check cost?

Database Validation is variable per service. Read the current rate for bra_cpf in the per-service pricing table. Billing is per successful service hit, so a multi-service request is billed once for each service that returns a hit.

Is a failed CPF lookup billed?

A request where every selected upstream service failed answers HTTP 502 with a validation_errors[] array, is not billed, and writes a COULD_NOT_PERFORM_DATABASE_VALIDATION log. Our pricing documentation also lists that some no-match lookups and retries are billable, so read that page before you build a retry loop.

What should I do when a CPF returns no_match?

Treat it as a synthetic identity under your policy, because the record is not at the source. The response carries the DATABASE_VALIDATION_NO_MATCH warning. Do not retry the same data, since a fabricated number will not appear on a second attempt.

What happens on a partial_match?

Some fields matched and others did not, for example the CPF and date of birth matched but the name did not. Route the session to review. In session mode the outcome is set by the on_partial_match action you configured on the workflow, which can send the session to review or decline it.

Can I confirm that the person holding the CPF is the person typing it?

In Brazil the source checks the user's selfie against the face on record itself and returns a verdict rather than a portrait. Because that is not a liveness check, we normalise the skip_liveness_and_face_match switch off on save, so your Liveness and Face Match steps still run. Face Match then compares the live capture with the selfie the lookup verified.

Does Didit support the gov.br wallet for Brazil?

gov.br is listed as coming soon on Didit's wallet price list, so it cannot be enabled in production yet. Google Wallet ID is available and covers Brazil at $0.10 per completed verification. Wallet sign-ins carry the cryptographic assurance tier rather than data_match.

What evidence does a database validation leave for an auditor?

For Database Validation, use database_validation.services_used and validations[].service to record which service answered; both sit on the decision payload, in the console and in exports. id_lookup.source applies to non-document ID lookup sessions, not to Database Validation. The end user never sees the source name, the price or the assurance tier.

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.