Skip to main content

ID Verification API: Integration and Evaluation Guide

A Didit ID verification API call costs $0.20 standalone and $0.15 inside a workflow, and returns extracted fields, a status and a warnings list. A 200 response is evidence, not an approval.

ID Verification API: Integration and Evaluation Guide

Contents

In this guide

Jump to the part you need.

A document-check API fits teams that already own document capture, and teams that want the check inside a provider-hosted flow. On Didit the standalone ID verification call costs $0.20 per completed response, and the same document step inside a workflow costs $0.15. The caveat matters more than the price: a HTTP 200 response alone is not an approval. Read id_verification.status and id_verification.warnings, and a forgery check that did not run returns In Review, not Approved.

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

ID verification API on Didit at a glance
ItemDetail
What you get backExtracted holder fields, parsed MRZ, decoded barcodes, a status, and a warnings list that explains every issue found
EndpointPOST https://verification.didit.me/v3/id-verification/, multipart form data
Authenticationx-api-key header, server side only. Sandbox keys start sk_test_, live keys start sk_live_
Price, standalone call$0.20 per 200 response
Price, document step inside a workflow$0.15 per check
Price, full ID check$0.33 = document $0.15 + passive liveness $0.10 + face match $0.05 + device and IP $0.03
Coverage220+ countries and territories, 14,000+ document types, 54 capture languages
Status valuesThe full enum is Not Started, In Progress, Approved, In Review, Declined, Abandoned and Kyc Expired. The standalone endpoint returns only Approved, Declined or In Review
SandboxFree on every plan, 500 session creates per sandbox application every 24 hours, every provider mocked

Start free in the sandbox at https://business.didit.me/, no sales call. If you build with an AI assistant, connect it to the Didit docs through https://didit.me/developers/mcp/.

What you are building, and the method we recommend

There are two delivery modes, and the choice changes your integration more than any other decision on this page.

Mode A, a session inside a workflow. Your backend creates a session with POST /v3/session/, receives a session.url, and hands that URL to the frontend. The user captures the document in the hosted flow or in a Didit SDK. Use this when a person is present and you also need liveness, face match, or a document plus a selfie in one decision.

Mode B, the standalone endpoint. Your backend posts one or two document images to POST /v3/id-verification/ and gets a document report in one response. Use this when the images already exist, for example a partner sends a document, or a back office re-checks a stored file. That route is the standalone ID verification product, documented on Didit ID verification and in the ID verification API reference.

For consumer onboarding, we recommend running the document step inside a workflow. The standalone call reads and authenticates a document, and that is genuinely useful. It does not prove that the person in front of you owns that document. When you need ownership, the workflow adds passive liveness at $0.10 and face match at $0.05, and the full ID check is $0.33 on the price list. Didit has 4,000+ active customer companies overall.

Prerequisites

  • A Didit organization and an application. The sandbox is a per-application mode, so create a sandbox application first and keep the live application separate.
  • An API key with access to the endpoint. The primary application key has full access. A scoped key needs the scope that covers what you call, or the request is refused with 403.
  • Credit for live calls. Each 200 response consumes one ID verification credit. The Free plan gives $10 of credit a month to organizations that sign up with a work email, and sandbox calls are never billed.
  • Images that meet the spec: uncropped, all four corners visible, tiff, jpg, jpeg, png, webp or pdf, maximum 5 MB per file, plus a back image for dual-sided documents such as ID cards and driver licences.
  • A webhook endpoint if you use sessions, and somewhere to store vendor_data so you can reconcile an attempt back to a customer.
  • A written policy that maps statuses and warning codes to your own approve, retry, step-up, review and decline states.

Step-by-step integration

  1. Create the workflow. In the Business Console, or with POST /v3/workflows/, add the ID verification feature. The canonical feature enum is ID_VERIFICATION, and OCR is the legacy name.
  2. Take a sandbox key and put it in your environment. Console path: Developers, then API keys. Store it as DIDIT_API_KEY and never ship it to a browser or a mobile bundle.
  3. Create the session from your backend and pass the URL to the frontend. Send only the scoped URL, never the API key.
    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_ID>","vendor_data":"user-42","callback":"https://myapp.com/return"}'
  4. Or, in standalone mode, post the document images. This is the call you can run today against a test document:
    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 'minimum_age=18' \
    -F 'expiration_date_not_detected_action=DECLINE' \
    -F 'invalid_mrz_action=DECLINE' \
    -F 'inconsistent_data_action=DECLINE' \
    -F 'preferred_characters=latin' \
    -F 'save_api_request=true' \
    -F 'vendor_data=user-123'
  5. Fetch the canonical decision instead of trusting the client. Use GET /v3/session/{sessionId}/decision/ or the status.updated webhook, and treat the redirect or the success screen as cosmetic.
  6. Map the result to your own states. Read status first, then warnings[], then the extracted fields. Do not collapse the report into a boolean.
  7. Download the media promptly. portrait_image, front_document_image and back_document_image are short-lived media URLs, so download them at once if your retention policy requires a copy, and store the file in your own storage under your own retention period. If your policy does not require the image, keep only the fields and warning codes it allows.
The document capture screen with the ID filling the frame and all four corners visible
Capture quality is an important source of document-processing failures, so test this screen on the devices your customers actually use.

Expected output

The response carries a request_id and an id_verification object. With save_api_request=true, which is the default, the call is persisted as an API-type session, the request_id is a real session id you can pass to GET /v3/session/{sessionId}/decision/, and a status.updated webhook is emitted. With save_api_request=false, nothing is stored and the identifier is a one-off correlation UUID.

{
  "request_id": "<uuid>",
  "id_verification": {
    "status": "Approved",
    "full_name": "...",
    "document_type": "Passport",
    "document_number": "...",
    "date_of_birth": "...",
    "expiration_date": "...",
    "parsed_address": "...",
    "mrz": { "...": "..." },
    "barcodes": [],
    "portrait_image": "https://<media-host>/ocr/...",
    "front_document_image": "https://<media-host>/ocr/...",
    "back_document_image": null,
    "warnings": []
  }
}

Each entry in warnings[] is a structured object, not a string: feature, risk, additional_data, log_type (error, warning or information), short_description, long_description and node_id. Store risk for your policy rules, and show long_description to the user when a retry is the right next step. The full field list is in the data models reference.

On status semantics: the full enum belongs to feature reports in workflow sessions, and the standalone endpoint narrows it to Approved, Declined or In Review. Three codes, PORTRAIT_IMAGE_NOT_DETECTED, INVALID_DATE and MRZ_NOT_DETECTED, exist in workflow sessions and are never produced by the standalone call, so do not build a policy that waits for them here.

The ID document report for one session in the Didit Business Console, showing extracted fields and warnings
One document report in the console: the same fields the API returns, with the warnings that produced the status.

Inputs and outputs

Standalone ID verification call: inputs and outputs
NameDirectionRequired or nullableNotes
front_imageInputRequiredUncropped image, all four corners visible. The service detects, aligns and crops it, so do not pre-crop
back_imageInputRequired for dual-sided documentsID cards and driver licences need it
perform_document_livenessInputDefault trueScreens for screen replays, printed copies and portrait manipulation
minimum_ageInputOptionalRaises MIN_AGE_NOT_REACHED when the holder is younger
invalid_mrz_action, inconsistent_data_action, expiration_date_not_detected_actionInputDefault per requestEach takes DECLINE or NO_ACTION and sets how that one risk is treated
preferred_charactersInputOptionalScript preference for the extracted text, for example latin
save_api_requestInputDefault trueControls persistence, the meaning of request_id, and whether a webhook is emitted
vendor_dataInputOptionalYour own customer reference, so you can reconcile the attempt later
statusOutputNot nullApproved, Declined or In Review on this endpoint
warnings[]OutputArrayEvery issue found, each with a stable risk code and a description
document_type, document_number, date_of_birth, expiration_date, parsed_address, mrz, barcodesOutputNullableFields the document supplied or the OCR could read
portrait_image, front_document_image, back_document_imageOutputNullableShort-lived media URLs, download them promptly

Failure cases and recovery

Always inspect status and warnings, not just the HTTP code. A readable but problematic document returns 200 with status set to Declined.

What each failure means and what to do
What you seeMeaningRecovery
401The x-api-key header is wrong, malformed, revoked or expiredRe-fetch the key, do not retry the same value
403, missing or scoped keyNo key header, or a scoped key without access to this resource or actionCall with a key that has that access
403, not enough creditsThe balance cannot cover the call. It is refused before any image processingTop up or run in the sandbox, which is never billed
400 COULD_NOT_RECOGNIZE_DOCUMENTThe document cannot be processed at allAsk for a new capture with all four corners visible. Do not treat it as fraud
400 multipart validationMissing back image on a dual-sided document, file over 5 MB, or an unsupported extensionFix the payload before the user sees anything
429Rate limit. The response includes a wait field in secondsBack off for that many seconds, then retry
200, DeclinedAt least one warning resolved to a decline, for example DOCUMENT_EXPIRED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, SPECIMEN_DOCUMENT_DETECTED or an extraction failureStop the flow, show the long_description of the first warning, and route to your appeal or alternate path
200, In Review, with DOCUMENT_LIVENESS_NOT_COMPUTEDThe requested forgery check produced no usable score, because the provider failed, answered non-200, or answered 200 with an error statusTreat the document as unchecked and route it to manual review. This escalation is not configurable and never overrides a Declined
200, In Review, any other causeA workflow sent the case to a human reviewerDo not approve the user. A reviewer owns the case
Client timeoutYou do not know whether the call completedReconcile with the decision endpoint using request_id or vendor_data before posting the same document again, because each 200 response is billed

The error bodies and retry guidance are documented in API errors, and the risk codes are catalogued in the ID verification API reference.

Each 200 response consumes one ID Verification credit, paid from your plan credit or top-up balance. That includes responses with status Declined and In Review, because the work ran. Sandbox calls are never billed.

The review boundary is the important one for compliance. Declined is a terminal answer from a defined control, so it belongs in your appeal or restriction path, not in a retry loop. In Review means a human must look, and you must not approve the user while it is open. The three actions you can set per request, invalid_mrz_action, inconsistent_data_action and expiration_date_not_detected_action, are policy decisions you are making at call time, so keep them in version control next to the policy that reads the result.

Worked cost example

Take 10,000 documents a month, posted to the standalone endpoint at list price:

  • 10,000 x $0.20 = $2,000.00 on the Free plan list price.
  • Growth takes 4% off every Didit price: $0.20 x 0.96 = $0.192, so 10,000 x $0.192 = $1,920.00.
  • Scale takes 10% off: $0.20 x 0.90 = $0.18, so 10,000 x $0.18 = $1,800.00.

The same 10,000 documents as the document step inside a workflow cost $0.15 each: 10,000 x $0.15 = $1,500.00. A full ID check adds the other three lines: $0.15 + $0.10 + $0.05 + $0.03 = $0.33, so 10,000 x $0.33 = $3,300.00, and on Scale $0.297 each, 10,000 x $0.297 = $2,970.00.

On the Free plan the $10 of monthly credit buys $10.00 / $0.20 = 50 standalone calls, or $10.00 / $0.33 = about 30 full ID checks. Plan fees, monthly credit and top-up rules are on the pricing page and in the pricing docs.

How to evaluate the integration before launch

Do not compare one accuracy number. Keep the evidence, the check that the evidence is genuine, and the link between the evidence and the person as three separate things in your test plan, the same way you keep them separate in your policy.

  • Use the sandbox to pin outcomes, not to measure accuracy. Sandbox outcomes come from scenarios and magic values, not from the pixels, so the captured media is real but the result is simulated. Every provider is mocked, and the live catalogue is served at GET /v1/sandbox/scenarios/. See sandbox test data.
  • Test with production-like evidence. Cover the document types, countries, scripts, expiry conditions, cameras, networks and older devices your customers actually present. Ask for a country and document matrix rather than a total.
  • Separate the claims in your own records. Document authenticity, holder linkage, liveness, image quality and contextual risk are different claims, and a single boolean throws away the difference.
  • Measure operations, not just decisions. Track completion, retries, abandonment, manual review rate, time to resolution, webhook delay and the reconciliation you had to do, broken down by document, device and language.
  • Keep provenance. Store the workflow version, the decision time, the warning codes and whether a human reviewed the case, so a later change in models or document templates does not make the old result unreadable.
The liveness result for the same verification session in the Didit Business Console
A document check alone does not prove ownership. Liveness and face match in the same workflow add that claim.

Sources

The next step takes a few minutes: create a sandbox application at https://business.didit.me/, copy the sk_test_ key, and run the curl above against a test document. No sales call and no credit spent. Sandbox outcomes are simulated and never billed, and active-liveness capture itself still runs in the sandbox.

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

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Frequently asked questions

What is an ID verification API?

An ID verification API is an endpoint that takes document images and returns structured evidence about them: extracted holder fields, parsed MRZ, decoded barcodes, a status and a list of warnings. On Didit that call is POST https://verification.didit.me/v3/id-verification/. It authenticates and reads the document. It does not by itself prove that the applicant owns the document.

How much does a Didit ID verification API call cost?

The standalone ID verification call is $0.20 per 200 response. The same document step inside a workflow is $0.15, and a full ID check with passive liveness, face match and device and IP analysis is $0.33. Growth takes 4% off those prices and Scale takes 10% off, and sandbox calls are never billed.

Does a 200 response mean the document is genuine?

No. A 200 means the request was processed, and you should read id_verification.status and id_verification.warnings. Status is Approved unless at least one warning resolves to a decline, and a forgery check that produced no usable score returns In Review with a DOCUMENT_LIVENESS_NOT_COMPUTED warning instead of Approved.

What does In Review mean and how should I handle it?

In Review means the case needs a human before anyone is approved. Route it to your manual review queue, keep access pending, and do not auto-approve. When the warning is DOCUMENT_LIVENESS_NOT_COMPUTED, treat the document as unchecked rather than as genuine.

Which statuses does the ID verification API return?

The full feature-status enum is Not Started, In Progress, Approved, In Review, Declined, Abandoned and Kyc Expired, and workflow sessions can report any of them. The standalone endpoint returns only Approved, Declined or In Review, plus a warnings array. Map each value to your own states rather than storing the raw string as a boolean.

What image formats and sizes does the API accept?

Accepted formats are tiff, jpg, jpeg, png, webp and pdf, with a maximum of 5 MB per file. Send uncropped images where all four corners of the document are visible, and send a back image for dual-sided documents such as ID cards and driver licences.

Should I use the session flow or the standalone endpoint?

Use a session with POST /v3/session/ when a person is present and you need liveness or face match alongside the document. Use the standalone endpoint when you already hold the images, for example in a partner or back-office flow. The session route also gives you a decision endpoint and session webhooks.

Is the sandbox free and can I test every outcome?

The sandbox is free on every plan, sessions are never billed, and every external provider is mocked. Each sandbox application can create 500 test sessions every 24 hours, and outcomes come from scenarios and magic values, so you can reproduce Approved, Declined and In Review deterministically.

What happens if my credit balance is too low?

The call returns 403 with a not-enough-credits error before any image processing happens. Top up your balance, or switch to a sandbox key, where the balance check is bypassed and nothing is billed. Auto top-up can keep live checks running without manual intervention.

Can I rely on the webhook alone?

A webhook is a notification that something changed, not the record itself. When you need the canonical decision, fetch it with GET /v3/session/{sessionId}/decision/ and read the arrays it returns. That fetch also recovers the result when a delivery is missed or delayed.

How do I evaluate accuracy across countries?

Ask for a country and document matrix instead of one total, then test with the evidence your customers actually present, including older devices and uncommon but legitimate documents. Report false accepts and false rejects at your intended thresholds separately, and include manual review rate and time to resolution.

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.