Skip to main content

Document Verification API for US Banking: How to Build It

Didit's document verification API reads 14,000+ document types across 220+ countries, returns OCR plus fraud warnings, and costs $0.15 per check in a flow or $0.20 standalone. Here is the integration, step by step.

Document Verification API for US Banking: How to Build It

Contents

In this guide

Jump to the part you need.

A document verification API reads a passport, driver's license or state ID, checks it for tampering, and returns the fields a bank needs at account opening. Didit fits US banks, credit unions and fintechs that already hold document images or want a hosted capture flow. The ID document check costs $0.15 inside a verification flow and $0.20 through the standalone API. The main caveat: a Declined or In Review result is not an approval. A person still decides.

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

Didit document verification for US banking at a glance
ItemDetail
Document check inside a verification flow$0.15 per completed check
Standalone ID verification API$0.20 per completed check
Full KYC check$0.33: document $0.15, passive liveness $0.10, face match $0.05, device and IP $0.03
AML screening$0.20 per check, 1,300+ lists
Coverage220+ countries and territories, 14,000+ document types, 54 interface languages
Speedsub-2-second p99 inference
SandboxSandbox testing is free and unlimited
Compliance marksSOC 2 Type 2, ISO/IEC 27001:2022 certified, iBeta Level 1 PAD, GDPR, DORA, MiCA, AMLD6, eIDAS 2.0
Customers4,000+ companies

Start free in the sandbox at business.didit.me, no sales call. If your team builds with an AI assistant, connect Didit through the MCP server. Plans, credits and the cost estimator are on the pricing page.

What a document verification API does in a bank flow

Two jobs happen in one call. The service classifies the document, reads the visual zone with OCR, decodes the MRZ and any barcode, then cross-checks dates, number formats and MRZ check digits and compares the visual zone against the MRZ. Separately it screens the images for tampering: screen replays, printed copies and portrait manipulation. You get one status, Approved, Declined or In Review, plus a warnings list that explains every issue found.

The applicant does not declare the country or the document type. Didit classifies the submitted document from the front image, and a capture that matches no known official design comes back as a warning rather than a silent guess. Coverage is 220+ countries and territories and 14,000+ document types, with document recognition in 130+ languages across 50+ scripts. Inference is sub-2-second p99, and every session carries 200+ fraud signals.

Where US banks apply it

These are product capabilities. What your institution accepts at onboarding is your own policy decision, not a setting inside the API.

  • Account opening. Banks commonly collect identity fields and document evidence during account opening, subject to their own legal and compliance policies. The response can include the holder name, date of birth, address and document number. Which fields come back varies by document and by the extraction result, so treat every returned field as optional in your schema. You can pass what the applicant typed as expected values so mismatches surface as warnings.
  • Loan and credit applications. The same document check binds an application to a person. Device and IP analysis is a separate priced component at $0.03 per check when you want it in the flow.
  • Wire transfers and high-value payments. Re-check the identity document before releasing a payment above your threshold.
  • Step-up authentication. Biometric authentication at $0.10 per authentication, with the first 50,000 active users each month free.
  • Periodic re-verification. Re-run the document check when a license or passport expires, and keep ongoing AML monitoring current at $0.07 per person a year.

Before you start: prerequisites

  • A Didit organization and a sandbox application for testing. Sign up at business.didit.me and create or retrieve the sandbox application through the documented account flow.
  • An API key from Developers, then API keys in the console. Keys start with sk_test_ for sandbox and sk_live_ for live, followed by 43 URL-safe characters. Keep them server-side only.
  • A workflow containing the ID_VERIFICATION feature, plus LIVENESS, FACE_MATCH and AML if you want the $0.33 full KYC check.
  • For the standalone route: uncropped document images, all four corners visible, under 5 MB each, in tiff, jpg, jpeg, png, webp or pdf.
  • An HTTPS endpoint for webhooks that answers within 5 seconds and verifies the X-Signature-V2 header.
  • Your own policy in writing: which warnings you decline on, who reviews an In Review result, and how long you retain images.

How to integrate the Didit document verification API, step by step

Two prices apply, and the difference is delivery mode, not the document. Inside a verification workflow the document step is $0.15 per completed check and every other module is billed on its own line, so a full KYC check is $0.33. The standalone endpoint, POST /v3/id-verification/, is $0.20 per completed check and returns OCR plus authenticity checks in one server-to-server call. The standalone route does not compare a selfie to the document portrait. When you need passive liveness and face match, use the workflow route, whose checks are documented on the ID verification product docs and priced on the pricing page.

  1. Choose the delivery mode. Session mode is the user-facing route: you create a session, the applicant captures the document on a hosted page or in the SDK, and the decision arrives by webhook. Standalone mode is server to server: you already hold one or two document images and want OCR plus authenticity checks in one call. Account opening normally uses session mode; back-office document files use the standalone endpoint.
  2. Create the workflow. This is the ordered set of checks a session runs. ID_VERIFICATION is the canonical feature name and OCR is its legacy alias. Persist the returned workflow.id.
    curl -X POST https://verification.didit.me/v3/workflows/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "workflow_label": "Standard KYC",
    "workflow_type": "kyc",
    "features": [
      {"feature": "ID_VERIFICATION"},
      {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}},
      {"feature": "FACE_MATCH"},
      {"feature": "AML"}
    ]
    }'
  3. Create the session and send the applicant to it. Pass vendor_data so the check binds to your customer record and duplicate detection works across sessions. The response contains session_id, url and session_token; redirect the applicant to the URL or mount the Web or Mobile SDK. Use double quotes around the JSON body so the shell expands WORKFLOW_ID.
    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/kyc/return\"}"
  4. Register the webhook destination. Save the returned secret_shared_key as an environment variable and verify X-Signature-V2 on every delivery. De-duplicate on event_id and respond within 5 seconds.
    curl -X POST https://verification.didit.me/v3/webhook/destinations/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"label": "Production", "url": "https://myapp.com/webhooks/didit", "subscribed_events": ["status.updated","data.updated","user.status.updated","user.data.updated"], "webhook_version": "v3"}'
  5. Read the decision. V3 responses use plural arrays: id_verifications, liveness_checks, face_matches, aml_screenings. Never assume the singular V2 fields.
    curl https://verification.didit.me/v3/session/$SESSION_ID/decision/ \
    -H "x-api-key: $DIDIT_API_KEY"
  6. Call the standalone document endpoint when you already hold the images. This is the document verification API in its narrowest form: one POST, multipart, no session UI. The three risk actions below decide whether an MRZ failure, a data mismatch or a missing expiry date declines the 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'
  7. Read the status and the warnings, not just the HTTP code. status is Approved unless a warning resolves to a decline. Fraud and hard failures always decline: DOCUMENT_EXPIRED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, SPECIMEN_DOCUMENT_DETECTED, NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED, DOCUMENT_NUMBER_NOT_DETECTED and COULD_NOT_DETECT_DOCUMENT_TYPE. Everything else, such as POSSIBLE_DUPLICATED_USER, is informational and never declines on its own.
  8. Route In Review to a person before anyone is boarded. With perform_document_liveness at its default of true, a forgery check that returns no usable score produces HTTP 200 with status: "In Review" and a DOCUMENT_LIVENESS_NOT_COMPUTED warning. That escalation is not configurable and never overrides a Declined.
The applicant photographs an ID document inside the hosted Didit flow
The hosted capture step in session mode. The applicant photographs the document once, and Didit detects, aligns and crops it, so you never pre-crop the file.

The response shape from the standalone endpoint, as documented:

{
  "request_id": "...",
  "id_verification": {
    "status": "Approved",
    "full_name": "...",
    "document_type": "...",
    "document_number": "...",
    "date_of_birth": "...",
    "expiration_date": "...",
    "parsed_address": "...",
    "mrz": {...},
    "barcodes": [...],
    "portrait_image": "https:///ocr/...",
    "front_document_image": "https:///ocr/...",
    "back_document_image": "https:///ocr/...",
    "warnings": []
  }
}
Didit analyzing an uploaded identity document before setting a status
The document is classified, read with OCR, and its MRZ and barcodes decoded before the status is set. A missing portrait or a failing check digit changes that status.

Inputs and outputs

Standalone ID verification request fields
FieldTypeRequiredWhat it does
front_imagefileYesFront of the document, uncropped, all four corners visible, up to 5 MB.
back_imagefileFor two-sided documentsBack of ID cards and driver's licenses.
perform_document_livenessbooleanNo, default trueScreens for screen replays, printed copies and portrait manipulation.
minimum_ageintegerNoDeclines with MIN_AGE_NOT_REACHED below the age you set.
invalid_mrz_actionDECLINE or NO_ACTIONNoWhether a failing MRZ check declines the document.
inconsistent_data_actionDECLINE or NO_ACTIONNoWhether a visual zone and MRZ mismatch declines the document.
expiration_date_not_detected_actionDECLINE or NO_ACTIONNoWhether a missing expiry date declines the document.
preferred_charactersstringNoExtracted text character set, for example latin.
save_api_requestbooleanNo, default truePersists the call as an API session you can fetch again, stores cropped images, emits status.updated.
vendor_datastringNoYour identifier, for example the customer number.
What the response returns to your banking system
FieldWhat it holds
request_idThe session id when save_api_request is true, a one-off correlation id when false.
statusApproved, Declined or In Review on the standalone endpoint.
full_name, date_of_birth, document_number, expiration_date, parsed_addressThe holder fields your customer record needs.
document_typeThe classified document type, chosen by the service, not by the applicant.
mrz, barcodesParsed machine-readable zone and decoded barcodes.
portrait_image, front_document_image, back_document_imageShort-lived media URLs for the cropped images.
warningsEvery issue found, each with a code and a long description you can show a reviewer.

Document fraud checks that run on every document

Document fraud in banking usually arrives as a photograph of a screen, a printed copy, a swapped portrait or a genuine document that belongs to someone else. The API returns a code for each pattern it finds, so your rules engine can act on the specific risk instead of a single fraud score.

  • SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED and PORTRAIT_MANIPULATION_DETECTED are the three image-level attacks, and each always declines.
  • PUBLIC_DOCUMENT_IMAGE_DETECTED and SPECIMEN_DOCUMENT_DETECTED catch stock sample images and specimen prints, and each always declines.
  • INVALID_MRZ, INCONSISTENT_DATA and EXPIRATION_DATE_NOT_DETECTED are the three risk groups you configure per request with DECLINE or NO_ACTION.
  • DUPLICATED_DOCUMENT, FRAUD_RISK_FROM_OCR, COUNTRY_NOT_ALLOWED and DOCUMENT_TYPE_NOT_ALLOWED let you narrow acceptance to the document types and countries your policy allows.

Set the three risk actions to DECLINE for a US account opening flow. That split is your implementation policy. Didit returns the status and warnings your configuration produces and does not decide on its own whether to ask for a second document. A bank that would rather collect a second document than turn an applicant away can leave one group at NO_ACTION and send it to review instead.

When the call fails and how to recover

Failure modes, cause and recovery
ResponseCauseWhat to do
401The x-api-key header is wrong, malformed, revoked or expired.Fetch the key again from the console. Never validate a key by its prefix: older keys have none.
403No key, a scoped key without access to this route, or a caller outside the key's IP list.Use a key with that access, or fix the IP list.
403, not enough creditsThe balance cannot cover the call. Returned before any image processing.Top up or turn on auto top-up. The sandbox keeps working.
400, COULD_NOT_RECOGNIZE_DOCUMENTThe document could not be processed at all.Ask for a new capture, uncropped, all four corners visible, in good light, or offer another document type.
200 with status: "Declined" and COULD_NOT_DETECT_DOCUMENT_TYPEThe front image does not match a known official document design with high confidence. This warning declines the request.Re-capture the front of the document, then fall back to another accepted document type if it fails again.
400, multipart errorMissing back_image on a two-sided document, a file over 5 MB, or an unsupported extension.Fix the payload; do not retry the same request unchanged.
200 with status: "Declined"A terminal warning such as DOCUMENT_EXPIRED or SCREEN_CAPTURE_DETECTED.Show the first warning's long description to the applicant and stop the flow.
200 with status: "In Review"DOCUMENT_LIVENESS_NOT_COMPUTED: the forgery check produced no usable score.Treat the document as unchecked and send it to a reviewer. Do not approve.
429Rate limit. The body carries a wait field in seconds.Back off for that many seconds, then retry.
Webhook 5xx, 404 or slower than 5 secondsYour handler did not acknowledge the event.Didit retries twice, after about 1 and 4 minutes, then drops the delivery. Resend it from the destination's delivery log.
A session overview showing its warnings in the Didit Business Console
A session overview with its warnings. In Review means a check produced no evidence, so a reviewer has to look before the customer is boarded.
A session's ID document result in the Didit Business Console
The document result in the Business Console: extracted fields, the classified type and the warnings that set the status.

What you pay, and where the review boundary sits

Billing is per completed check from prepaid credit. Each 200 response on the standalone endpoint consumes one ID Verification API credit, which is $0.20. Inside a workflow the same document check is $0.15, because the session charges each module on its own line.

The other lines a US account opening flow usually adds: passive liveness $0.10, face match 1:1 $0.05 and device and IP analysis $0.03, which together with the document check is the $0.33 full KYC. AML screening is $0.20 per check, ongoing AML monitoring $0.07 per person a year, proof of address $0.20, Document AI $0.20 per document, and NFC chip reading $0.15 as an add-on. The Investigator agent, which reviews cases and follows up, is included on the Growth plan. The workflow orchestrator, the SDKs and the MCP server carry no separate fee.

Plans: Free at $0 a month with $10 of credit, Growth at $99 a month with $115 of credit and 4% off every price, Scale at $299 a month with $350 of credit and 10% off, Enterprise from $15,000 a year. Monthly credit is spent first, then top-ups, and unused monthly credit does not roll over. Full detail is on the pricing page and in the pricing docs.

Two boundaries matter in an audit. An In Review result means a check did not produce usable evidence, so it must reach a reviewer before the customer is boarded. A Declined result is final on that document, so the next step is a fresh capture or a documented alternative path, not a retry of the same image. Didit returns a status and warnings. Your bank decides whether to open the account, set limits or file a suspicious activity report.

Worked cost example

A bank or fintech opens 20,000 new accounts a month and runs a full KYC check plus AML screening on each one.

  • List price per account: $0.33 for the KYC check plus $0.20 for AML screening, which is $0.53. 20,000 times $0.53 is $10,600 a month.
  • At Scale prices: $0.297 for the KYC check plus $0.18 for AML screening, which is $0.477. 20,000 times $0.477 is $9,540.
  • The $350 monthly Scale credit pays the first $350 of that usage, so usage beyond credit is $9,540 minus $350, which is $9,190. Add the $299 monthly plan fee and the month costs $9,489.
  • If the same team only re-checks documents on existing customers through the standalone API, 5,000 calls at $0.20 is $1,000. The same 5,000 document checks inside a workflow cost 5,000 times $0.15, or $750.

What to check before you commit

  • Retention and audit log. Growth keeps 5 years of data and a 1-year audit log, Scale up to 10 years and a 3-year audit log with export, Free 1 year and 30 days. Match that to your record retention policy before you sign.
  • Warning policy. Ask which warning codes decline, which go to review and who decides. A vendor that returns one opaque score leaves you unable to answer a regulator.
  • Price per completed check. A document check at $0.15 and a full KYC at $0.33 are different products. Model the checks you will actually run.
  • Review path. Confirm that In Review is never auto-approved and that the reviewer's decision is stored with the session.
  • Vendor security evidence. SOC 2 Type 2 and ISO/IEC 27001:2022 certification, plus the data processing agreement your legal team needs.

Sources

Next step: open the sandbox at business.didit.me, create a KYC workflow with the ID verification feature, and run your first document check against a test image. No sales call is needed to start, and the integration prompt hands the whole build to your coding agent.

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 AI powered document verification in banking?

It uses a model to classify an identity document, read its fields with OCR, decode the MRZ and barcodes, and screen the images for tampering, instead of a clerk comparing a scan against a checklist. Didit runs all of that in one call and returns a status plus a warnings list. It covers 220+ countries and 14,000+ document types at $0.15 per document check inside a verification flow, or $0.20 through the standalone API.

How much does a document verification API cost?

Didit charges $0.20 per completed check on the standalone ID verification API and $0.15 per document check inside a verification workflow, while a full KYC check that adds passive liveness, face match and device and IP analysis is $0.33. Billing is per completed check from prepaid credit. The Free plan includes $10 of credit a month for organizations that sign up with a work email.

Which API detects document fraud?

The Didit ID verification endpoint, POST /v3/id-verification/, runs the fraud checks in the same call as the OCR: screen capture, printed copy, portrait manipulation, public document image, specimen document, expired document, MRZ failures and inconsistent data. Each finding comes back as a warning code with a long description. The fraud and hard-failure codes always decline the document.

Does the standalone API run liveness or face match?

No. The standalone document endpoint returns OCR, authenticity checks and, with perform_document_liveness at its default, document forgery screening. It does not compare a selfie to the document portrait. Passive liveness at $0.10 and face match 1:1 at $0.05 run inside a verification workflow, which is why a full KYC check costs $0.33.

What documents can the API read?

Passports, national ID cards, driver's licenses, residence permits and other government-issued documents: 14,000+ document types from 220+ countries and territories, with document recognition in 130+ languages across 50+ scripts. You send the front image and, for two-sided documents, the back image. Do not pre-crop, because the service detects, aligns and crops the document itself.

What happens when a document cannot be read?

If the document cannot be processed at all, the call returns HTTP 400 with COULD_NOT_RECOGNIZE_DOCUMENT. If the document is readable but the front image does not match a known official design, the call returns HTTP 200 with status: "Declined" and COULD_NOT_DETECT_DOCUMENT_TYPE. Either way, ask for a new capture with all four corners visible and better light rather than retrying the same file.

What does an In Review result mean?

In Review means a check that should have run produced no usable score, for example when the document forgery check fails and the response carries DOCUMENT_LIVENESS_NOT_COMPUTED. Didit does not treat that as a pass. Route the session to a human reviewer and record the outcome before the customer is boarded.

Do we need a sales call to test it?

No. Create an organization at business.didit.me and test there: sandbox testing is free and unlimited on every plan, the checks are mocked and nothing is charged. Switch to a live key once your organization has credit.

Is Didit suitable for a US bank vendor review?

Didit holds SOC 2 Type 2 and ISO/IEC 27001:2022 certification, and lists iBeta Level 1 PAD, GDPR, DORA, MiCA, AMLD6 and eIDAS 2.0 as compliance marks. Data retention and audit log length follow your plan: Growth keeps 5 years of data and a 1-year audit log, Scale up to 10 years and a 3-year audit log with export. Your own customer identification and AML programme stays yours; the API supplies the checks and the audit trail.

Can we run the check inside our own app?

Yes. Session mode gives you a hosted URL, or you mount the Didit Web or Mobile SDK and keep your own interface. The decision arrives by webhook on status.updated or from GET /v3/session/{sessionId}/decision/. The standalone endpoint exists for server-to-server calls where you already hold the images.

How fast is the API?

Document inference is sub-2-second p99 on Didit's published figure, and the platform reports 100% uptime over the last six months against a 99.99% availability target. The hosted flow adds the applicant's own capture time, which you cannot remove, only shorten with clear on-screen guidance.

How does duplicate detection work across accounts?

Pass vendor_data on the session so Didit binds the check to your customer record, and duplicates surface as warnings such as POSSIBLE_DUPLICATED_USER or DUPLICATED_DOCUMENT. If your organization runs separate account bases, multi_account_segment keeps duplicate face checks inside that segment, while blocklists and allowlists apply everywhere.

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.