Skip to main content

ID Document Serial Number Validation: A 2026 How-To

ID serial number validation checks a document number's format, MRZ check digits and cross-zone consistency. Didit charges $0.15 per workflow document check or $0.20 on the standalone API.

ID Document Serial Number Validation: A 2026 How-To

Contents

In this guide

Jump to the part you need.

Serial number validation fits teams onboarding government IDs at volume who want the document number checked for format, check digits and cross-zone consistency. We charge $0.15 per workflow document check and $0.20 per standalone API check. Those prices cover document checks. Database Validation is a separate, variably priced check of the identifier and details accepted by the selected source. A source match on the holder's national ID number alone does not establish that a specific document serial was issued.

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

What serial number validation covers on Didit, and what it costs
QuestionWhat actually runsDidit surfacePrice (USD)
Is the document number the right shape for this document?Date and number-format checks, MRZ check digits, visual zone compared with the MRZID Verification$0.15 per check in a workflow, $0.20 on the standalone API
Did the check raise a duplicate warning?Didit lists DUPLICATED_DOCUMENT as an ID Verification warning. Review the session's status and warnings together.ID VerificationIncluded
Does the national ID number exist in the issuing country's record?Per-field match against the authoritative source for that countryDatabase ValidationVariable by country and service, from $0.05 per check
Can we check a typed national ID number without a document photo?Data match against the named source, assurance tier data_matchNon-document lookupVariable by country
Is the physical document a screen replay, a print or a manipulated portrait?Document liveness inside the same callID VerificationIncluded
Is the presenter the person on the document?Document verification, passive liveness, face match against the document portrait, and device and IP analysisFull KYC$0.33 per check

Start free in the sandbox at business.didit.me, no sales call needed. Developers who want an AI assistant to drive the integration can connect Didit through the Didit MCP server.

What an ID document serial number is

An ID document serial number is the unique identifier a government authority prints on the document it issues. On a passport it is the passport number, printed on the data page and repeated inside the machine readable zone. On a national ID card or a driver's licence it is the document number, often printed near the personal identification number. People use document serial number, ID serial number and document ID interchangeably in searches, and exact field labels vary by issuer.

Two numbers can appear on one card and they are not interchangeable. The document number identifies the physical document. The personal number identifies the holder, and in many countries that is the number a registry can actually be asked about. The machine readable zone carries a check digit computed from the document number by a published algorithm. A matching check digit means the extracted characters satisfy the checksum. It can catch some reading errors, but it cannot establish accurate transcription, issuance or authenticity.

A legally acceptable ID has which characteristic

A legally acceptable ID has three characteristics to verify: an accepted document type, the applicable expiry rule, and the required evidence for the check. The applicable authority's current list decides all three for the specific check. For a UK right to work check, read the government's right to work checklist rather than a generic list.

Being acceptable in form does not prove the person presenting the document owns it. A genuine stolen ID can pass format and checksum checks. Passive liveness assesses whether the capture is live, and face match compares the presenter's face with the document portrait. We bundle the document check, passive liveness, face match and device and IP analysis into the $0.33 full KYC check.

What serial number validation actually checks

The phrase suggests a lookup against a master list of every document ever issued. No single public list of that kind exists. What a production check does is narrower. Review the extracted fields, status and warnings in the ID Verification result. If you run Database Validation, inspect its separate match result.

1. Extraction of the document number

We classify the document automatically, so you never declare the country or the type. We read the visual zone with OCR and decode the MRZ and any barcodes in the same call. The document number lands in document_number. If the field cannot be read at all, the call raises DOCUMENT_NUMBER_NOT_DETECTED, a hard extraction failure on the standalone API that results in Declined.

The analysis screen while Didit reads the document and checks its fields
We read the visual zone and decode the MRZ and any supported barcodes. The standalone API compares the visual zone with the MRZ.

2. Format and pattern rules

Each document type and issuing country has its own rules for length and character set. The standalone API checks dates, number formats and MRZ check digits, and compares the visual zone with the MRZ. Inspect the returned status and warnings for the outcome.

3. MRZ check digits and cross-zone consistency

The check digits inside the MRZ are recomputed and the visual zone is compared with the MRZ. INVALID_MRZ is raised when a validity check fails, such as a checksum mismatch. Both invalid_mrz_action and inconsistent_data_action can be set to DECLINE or NO_ACTION for a standalone call.

4. Duplicate warnings

Didit lists DUPLICATED_DOCUMENT as an ID Verification warning. Review the session's status and warnings together before you decide what a duplicate means for that customer, because legitimate re-onboarding exists.

5. Registry lookup for national ID numbers

Where a country exposes an authoritative source we can reach, Database Validation compares the supplied identifier and personal details with the selected service's records. A match shows that the submitted details agree with a record. A mismatch warrants review under your policy. Coverage is live in 60+ countries and the source is named per country, which matters to an auditor.

6. Document liveness and forgery signals

With perform_document_liveness=true, the images are screened for screen replays, printed copies and portrait manipulation. Those risks decline. When document liveness is enabled and produces no usable score, the standalone API returns In Review with DOCUMENT_LIVENESS_NOT_COMPUTED, unless another warning already caused a decline, because a check that did not run is not evidence that the document is genuine.

Session detail showing the extracted ID document fields and its warnings
The session detail keeps the extracted number, the MRZ and every warning next to the images.

How to validate an ID document serial number with Didit

The outcome you want is a decision on each document, with the number checked and every risk it raised written down. The recommended route is the hosted workflow: configure ID Verification once, let users capture in the flow we host, then read the decision. Use the standalone API when you already hold the images and need one call. The product page is Didit ID Verification, the integration detail is in the Didit ID Verification overview, and list prices are on didit.me/pricing.

Prerequisites for the hosted workflow

  • A Didit account and an API key from the Business Console.
  • A workflow with the ID_VERIFICATION feature, created in the Console or with POST /v3/workflows/, listing the document types and subtypes you accept.
  • For live checks, enough credit to cover the checks you run. Plan credit is used first, then top-ups. Sandbox testing is free.

Prerequisites for the standalone API

  • An API key. This route does not require a workflow.
  • An approved test document for sandbox runs, uncropped with all four corners visible. front_image is required, and back_image is required for two-sided documents such as ID cards and driver's licences. tiff, jpg, jpeg, png, webp or pdf, 5 MB maximum each.
  • For live standalone calls, enough credit to cover the call. Sandbox testing is free. A live standalone call returns 403 before image processing when the balance cannot cover it.

Steps

  1. Hosted route: create the workflow and add ID Verification. Set the document types and subtypes you accept; a type you did not allow raises DOCUMENT_TYPE_NOT_ALLOWED.
  2. Hosted route: create the session with POST /v3/session/, sending workflow_id, vendor_data and callback. Open the returned session.url for the user, or mount the Web or Mobile SDK.
  3. Standalone route: skip the two steps above and send the document server to server with the call below. The example keeps to document inputs, document liveness and the two risk actions this article covers. An expiry setting or save_api_request is optional.
  4. Set the risk actions you want before you go live. invalid_mrz_action and inconsistent_data_action can be DECLINE or NO_ACTION. expiration_date_not_detected_action is a separate expiry setting for a document whose expiration date could not be read; it does not test the document number.
  5. Read status and the whole warnings array. Never rely on the HTTP code alone.
  6. Hosted route: fetch the result with GET /v3/session/{sessionId}/decision/ or subscribe to the session.status.updated webhook. The result sits under id_verifications[], one entry per document collected. The workflow lifecycle statuses are Not Started, In Progress, Approved, In Review, Declined, Abandoned and Kyc Expired.
  7. Where the selected country supports the method, add a Database Validation step after the document step to compare the national ID number with the selected authoritative source.
curl -X POST 'https://verification.didit.me/v3/id-verification/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'front_image=@./id_front.jpg' \
-F 'back_image=@./id_back.jpg' \
-F 'perform_document_liveness=true' \
-F 'invalid_mrz_action=DECLINE' \
-F 'inconsistent_data_action=DECLINE' \
-F 'vendor_data=user-123'

Expected output

The standalone API documents three statuses for a completed request: Approved, Declined and In Review. You read request_id and the fields inside the id_verification object, which are listed in the table below. A document that cannot be processed at all returns HTTP 400 with COULD_NOT_RECOGNIZE_DOCUMENT. That is not a fraud verdict; if image quality is poor, recapture. With save_api_request=true, the default, the request_id is a real session id you can pass to the decision endpoint, Didit stores the cropped images and returns short-lived media URLs for them, and we send a status.updated webhook to your configured endpoints. URL expiry does not establish the image retention period.

Standalone outcomes and what each one costs

Every standalone ID Verification outcome and whether it consumes a credit
ResponseWhat it meansCredit consumed
HTTP 400 with multipart validation errorsMultipart validation rejected an invalid upload, such as a missing back_image on a two-sided document, a file over 5 MB, or an unsupported extension. No credit is consumed.No
HTTP 400 COULD_NOT_RECOGNIZE_DOCUMENTDidit could not recognize or process the submitted document. No credit is consumed. If image quality is poor, recapture with all four corners visible and no glare.No
HTTP 403 with the not-enough-credits errorThe balance cannot cover the call. Nothing was processed.No
HTTP 200 with status ApprovedNo warning resolved to a decline.Yes, one ID Verification API credit
HTTP 200 with status DeclinedAt least one terminal warning was raised, for example a hard extraction failure or a document risk you set to decline.Yes
HTTP 200 with status In ReviewThe call could not reach a decision, for example when the forgery check produced no usable score. A human decides.Yes

Inputs and outputs

Fields you send and fields you read on one ID Verification call
FieldDirectionNotes
front_imageInputRequired. Uncropped, all four corners visible.
back_imageInputRequired for two-sided documents.
perform_document_livenessInputDefaults to true. Screens for replays, prints and portrait manipulation.
invalid_mrz_action, inconsistent_data_action, expiration_date_not_detected_actionInputDECLINE or NO_ACTION per request. The expiry setting governs a missing expiration date only.
minimum_ageInputRaises MIN_AGE_NOT_REACHED below the threshold.
vendor_dataInputYour own reference for the person or case.
request_idOutputA real session id when save_api_request is true.
statusOutputApproved, Declined or In Review. In Review is not an approval.
document_numberOutputThe document number read from the document.
document_type, full_name, date_of_birth, expiration_date, parsed_addressOutputThe extracted holder fields.
mrz, barcodesOutputParsed machine readable zone and decoded barcodes, when the document has them.
portrait_image, front_document_image, back_document_imageOutputShort-lived media URLs for the stored images.
warnings[]OutputEvery risk code raised, with a long description you can show the user.

Failure cases and recovery

What goes wrong and what to do about it
FailureWhat you seeRecovery
No creditsHTTP 403 with the not-enough-credits errorTop up or move to a plan with credit. Nothing was processed, so nothing was charged.
Bad uploadHTTP 400 with multipart validation errors: missing back_image, file over 5 MB, unsupported extensionFix the file and resubmit. Not billed.
Unreadable imageHTTP 400 COULD_NOT_RECOGNIZE_DOCUMENTRecapture with all four corners visible and no glare.
Number or MRZ failsStatus Declined with INVALID_MRZ or INCONSISTENT_DATA, when the corresponding action is set to DECLINEShow the first warning's long description to the user and stop. A poor capture can also fail the read, so look at the stored images before you label it fraud.
Forgery check produced no usable score.Status In Review with DOCUMENT_LIVENESS_NOT_COMPUTEDTreat the document as unchecked and send it to manual review. Do not approve.
Anything else in reviewStatus In ReviewRoute to your review queue and do not approve the user.

Adding a registry check for a national ID number

Format and checksum checks tell you the characters are internally consistent. They cannot prove the number was issued to this person. To check whether the holder's details match a record, add Database Validation to the workflow or call the standalone Database Validation API. Send the issuing state, the identification number accepted by the selected service, and the additional fields and consent that service requires. For example, the documented Brazil CPF request sends issuing_state=BRA, identification_number, first_name, last_name and date_of_birth. A full match means the checked fields agree with a record held by the selected authoritative source. For a partial match, inspect which fields matched. A mismatch warrants review under your policy. Where the flow starts from a typed identifier rather than a photo, non-document lookup does the same job and labels the result data_match.

A session overview listing the warnings raised during a verification
The session overview is where a reviewer sees the number check and every warning in one place.

Worked cost example

Ten thousand document checks a month, in monthly USD usage at list price, with the arithmetic shown.

  • ID Verification alone on a workflow: 10,000 x $0.15 = $1,500.
  • ID Verification alone on the standalone API: 10,000 x $0.20 = $2,000.
  • Full KYC: $0.15 for ID Verification + $0.10 for Passive Liveness + $0.05 for Face Match + $0.03 for Device & IP Analysis = $0.33 per check. 10,000 x $0.33 = $3,300.
  • Full KYC on Scale, 10% off every Didit price: 10,000 x $0.297 = $2,970 in usage before plan credit and subscription fees. $2,970 minus $350 in credit = $2,620 in uncovered usage. $2,620 plus the $299 subscription = $2,919.

On Growth the lines are separate. The plan fee is $99 a month, the plan includes $115 of credit a month, and every Didit price is 4% lower, so the ID check is $0.144: 10,000 x $0.144 = $1,440 in check charges. The $115 monthly credit leaves $1,325 to pay from prepaid top-ups. Including the $99 Growth subscription, the plan fee plus uncovered usage totals $1,424 for the month.

Database Validation is not in that arithmetic because it is priced per service and per country, from $0.05 up to $7.00 depending on what the source charges. Read the rate for the exact service before you quote a number, and remember that a request where every upstream service fails is not billed.

Each HTTP 200 from the standalone ID Verification API consumes one ID Verification API credit. Inside a workflow the same check is billed at the $0.15 module price. Document liveness and the number cross-checks run inside that price, so a failed MRZ costs no more than a passing one. Full KYC costs $0.33 at list price: $0.15 for ID Verification + $0.10 for Passive Liveness + $0.05 for Face Match + $0.03 for Device & IP Analysis.

When a result comes back In Review, route it to your manual-review queue and do not approve the user; the console shows every warning attached to the session. A decline is a decision. Fix the capture or the document rather than re-running the same image and hoping for a different answer.

Where serial number checks earn their keep

  • Financial services. Account opening and lending. An invalid document number or MRZ checksum gives reviewers a specific reason to inspect an application.
  • Marketplaces. Use the DUPLICATED_DOCUMENT warning as a filter for which seller sessions a reviewer opens first.
  • Gaming and gambling. Age gates and duplicate accounts. Add minimum_age to the same call that reads the number.
  • Telecommunications. SIM registration and swap protection, where the registry lookup does more work than the document check alone.

What serial number validation cannot do

  • Confirming that a specific document serial number was issued requires an authoritative source that explicitly verifies that serial number. A match on the holder's national ID number alone does not establish issuance of the document.
  • A checksum can catch some reading errors. It cannot establish accurate transcription, issuance or authenticity, and it will not stop a skilled forgery built from a real number.
  • A genuine stolen ID can pass format and checksum checks. Passive liveness assesses whether the capture is live, and face match compares the presenter's face with the document portrait.
  • Registry coverage is uneven. For non-document lookup in Canada, France, Indonesia, the Netherlands, Norway, Singapore, the United Kingdom and the United States, the record we can reach is a credit-bureau, financial-services, utility or residential-records file rather than a state register, and the docs name the source per country.
  • A duplicate warning needs a policy behind it, because legitimate re-onboarding sits alongside genuine misuse.

Sources

Start in the sandbox at business.didit.me, no sales call required. Test the route you intend to deploy, then inspect the status and warnings in the response before you change any setting.

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 an ID serial number?

It is the unique document number a government prints on the ID it issues. On a passport it is the passport number, repeated in the machine readable zone; on a national ID card it is the card's document number, which is different from the holder's personal number. Validation checks its format, its check digits and its consistency with the rest of the document.

Is a document serial number the same as a national ID number?

No. The document number identifies the card or booklet, while the national ID number identifies the person. Didit returns the document number as document_number from ID Verification, and checks a national ID number against a record through Database Validation or non-document lookup.

Can Didit check a serial number against a lost or stolen database?

The documented checks do not establish whether a specific document was reported lost or stolen. ID Verification checks the number's format and checksums, and a holder-record match through Database Validation answers a different question: whether the submitted details agree with a record held by the selected source. A genuine stolen ID can pass format and checksum checks, so pair the document check with passive liveness and face match.

A legally acceptable ID has which characteristic?

A legally acceptable ID has an accepted document type, follows the applicable expiry rule and provides the required evidence for the specific check. The applicable authority's current list decides those points. For a UK right to work check, use the government's right to work checklist.

What does the INVALID_MRZ warning mean?

INVALID_MRZ is raised when a validity check on the machine readable zone fails, such as a checksum mismatch, which points to a damaged read or to edited data. Setting invalid_mrz_action=DECLINE turns it into a decline; NO_ACTION keeps it as information only. Look at the stored images before you call it fraud, because a poor capture fails the read too.

What happens if the document number is not detected?

On the standalone API, DOCUMENT_NUMBER_NOT_DETECTED is a hard extraction failure that results in Declined. Ask for a fresh uncropped capture with all four corners visible if the original image was unclear. Check the returned warnings before you change any setting.

Does serial number validation replace liveness and face match?

No. Number checks test the document, not the person holding it, and a stolen genuine passport has a valid format and valid check digits. A genuine stolen ID can pass format and checksum checks. Passive liveness assesses whether the capture is live, and face match compares the presenter's face with the document portrait; both are in the $0.33 full KYC check, which costs $0.15 for ID Verification + $0.10 for Passive Liveness + $0.05 for Face Match + $0.03 for Device & IP Analysis.

How much does serial number validation cost?

$0.15 per ID Verification check inside a workflow, or $0.20 per call on the standalone ID Verification API. Document liveness and the number cross-checks run inside that price. A registry check through Database Validation is priced per country and per service, from $0.05 per check.

Can I validate a national ID number without a document image?

Yes, in countries where non-document lookup is supported. It checks the typed national ID number and the personal details required by the selected source. A successful match carries the data_match assurance tier and confirms agreement with the source record. Document authenticity remains unverified.

What does the DUPLICATED_DOCUMENT warning mean?

In an ID Verification session, DUPLICATED_DOCUMENT flags a possible document repeat for review. Check the session status and context before deciding whether the repeat is expected. The standalone API separately documents POSSIBLE_DUPLICATED_USER as informational.

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.