> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# ID Verification Overview

> Verify identity documents across 220+ countries and 14,000+ types with AI OCR. Pay-per-call $0.15, 500 free/month, sub-2-second inference.

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

export const VideoEmbed = ({src, title = "Video", type = "iframe"}) => <div className={type === "iframe" ? "didit-video-embed" : "didit-video-embed didit-video-native"}>
    {type === "iframe" ? <iframe src={src} title={title} style={{
  width: "100%",
  height: "100%",
  border: 0,
  borderRadius: "12px"
}} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen /> : <video controls autoPlay muted loop playsInline src={src} title={title} style={{
  width: "100%",
  height: "auto",
  display: "block",
  borderRadius: "12px"
}} />}
  </div>;

<VideoEmbed src="https://www.youtube.com/embed/h0i9Q0-izcw?start=385&rel=0&playsinline=1" title="ID Verification: Data Extraction & Geolocation" />

Powered by cutting-edge AI, computer vision, and biometric technology, our solution ensures fast, accurate, and secure identity verification at scale. Designed to combat fraud, simplify compliance, and enhance user experience, Didit provides a robust and trustworthy platform that meets the highest industry standards.

<AgentPromptAccordion
  title="ID Verification Integration Prompt"
  prompt={`# Goal
Integrate Didit ID Verification (OCR + document authenticity) into your app. Pick ONE of the two delivery modes below.

# Mode A — Session-based (recommended for user-facing flows)
Use this when the user uploads / photographs their document in a hosted Didit flow. The feature is configured on a workflow and runs as part of /v3/session/.

1. Create a workflow with the ID_VERIFICATION feature (Business Console or POST /v3/workflows/). Canonical feature enum: "OCR" (legacy) or "ID_VERIFICATION".
2. Create a session — POST /v3/session/ with { workflow_id, vendor_data, callback }. See /sessions-api/create-session.
3. Open the returned session.url for the user OR mount the Web/Mobile SDK.
4. After completion fetch the decision — GET /v3/session/{sessionId}/decision/ (or subscribe to the session.status.updated webhook).

The decision response surfaces the result under the plural array \`id_verifications[]\` (one entry per document collected in the workflow).

# Mode B — Standalone API (server-to-server)
Use when you already have one or two document images and want a one-shot OCR + checks call.

POST https://verification.didit.me/v3/id-verification/
multipart/form-data — x-api-key: YOUR_API_KEY

Required: front_image. Required for dual-sided docs (ID cards, driver licences): back_image.
Allowed extensions: tiff/jpg/jpeg/png/webp/pdf. Max 5 MB per file. Images must be uncropped — all 4 corners visible.

curl example:
\`\`\`bash
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'
\`\`\`
Returns: { request_id, id_verification: { status, full_name, document_type, document_number, date_of_birth, expiration_date, parsed_address, mrz, barcodes, portrait_image, front_document_image, back_document_image, warnings: [...] } }.

# Status enum (per id_verifications[].status)
"Not Started" | "In Progress" | "Approved" | "In Review" | "Declined" | "Abandoned" | "Kyc Expired"

# Warnings (LogWarningChoices.ID_VERIFICATION)
The warnings[] array on each id_verification carries risk codes including:
DOCUMENT_EXPIRED, INVALID_MRZ, INCONSISTENT_DATA, COULD_NOT_RECOGNIZE_DOCUMENT, DOCUMENT_LIVENESS_FAILED, MIN_AGE_NOT_REACHED, MAX_AGE_EXCEEDED, EXPIRATION_DATE_NOT_DETECTED, DUPLICATED_DOCUMENT, FRAUD_RISK_FROM_OCR, COUNTRY_NOT_ALLOWED, DOCUMENT_TYPE_NOT_ALLOWED.
Full catalogue: /core-technology/id-verification/warnings-id-verification.

# Failure modes to handle
- HTTP 403 "You don't have enough credits..." — insufficient balance.
- HTTP 400 with multipart validation errors (missing back_image on dual-sided docs, file > 5 MB, unsupported extension).
- status="Declined" with one or more terminal warnings (DOCUMENT_EXPIRED, DOCUMENT_LIVENESS_FAILED, COULD_NOT_RECOGNIZE_DOCUMENT, etc.) — surface the first warning's long_description to the user and stop the flow.
- status="In Review" — route to your manual-review queue; do not approve the user.

# See also
- Canonical schema: /reference/data-models#id-verification
- Full integration playbook: /integration/integration-prompt
- Risk catalogue: /core-technology/id-verification/warnings-id-verification
- Per-feature report: /core-technology/id-verification/report-id-verification`}
/>

<Frame>
  <img src="https://mintcdn.com/didit-0f962782/z6T2GHM4Zh-iSj-K/images/id-verification-steps.png?fit=max&auto=format&n=z6T2GHM4Zh-iSj-K&q=85&s=42c64546f3495000d7ea3b10c4b5fa50" alt="Didit ID verification steps from document capture to AI-powered analysis and decision" width="4780" height="2276" data-path="images/id-verification-steps.png" />
</Frame>

<Steps>
  <Step title="Intelligent Capture" icon="camera">
    Effortlessly begin the verification process with our intuitive, AI-driven capture system. Users upload or photograph their ID documents with real-time assistance:

    * **Auto-detection** of document type and issuing country
    * **Real-time visual cues** for optimal positioning, lighting, and focus
    * **Automatic capture** when conditions are ideal — no manual retries needed
    * Supports **passports**, **driver's licenses**, **national ID cards**, and **residence permits**

    <Note>
      *Why it matters*: Our intelligent capture reduces user friction and ensures high-quality submissions on the first attempt, boosting conversion rates and trust.
    </Note>
  </Step>

  <Step title="Advanced Data Processing" icon="microchip-ai">
    Extract and validate identity data with unmatched precision.

    **Data Extraction** — State-of-the-art technology processes all key fields:

    | Capability           | Details                                                                              |
    | -------------------- | ------------------------------------------------------------------------------------ |
    | **Field extraction** | Full name, date of birth, document number, issue/expiry dates, nationality, and more |
    | **OCR**              | High-precision text recognition                                                      |
    | **MRZ parsing**      | Machine-Readable Zone decoding                                                       |
    | **Barcode decoding** | Automatic barcode data extraction                                                    |

    **Data Validation**:

    * Cross-references data between visual zones, MRZ, and barcodes for consistency
    * Format and pattern matching to detect anomalies
    * Real-time queries against government databases (where permitted) for authoritative verification

    <Note>
      *Why it matters*: Comprehensive data processing ensures accuracy and eliminates errors, giving you confidence in every verification.
    </Note>
  </Step>

  <Step title="Advanced Analysis" icon="shield-check">
    Our AI-powered system performs comprehensive checks to ensure document integrity and authenticity:

    * **Document authenticity** verification
    * **Tamper detection** and image integrity analysis
    * **Document liveness detection** to prevent fraud from:
      * Screen captures of digital documents
      * Photos of documents displayed on screens
      * Printed document copies
      * Manipulated documents with altered portraits
    * **Security feature validation** (holograms, watermarks, etc.)
    * **Template matching** against certified database
  </Step>

  <Step title="Seamless Results & Integration" icon="file-export">
    Get actionable insights instantly with flexible delivery options.

    **Real-Time Results**:

    * Immediate updates via an intuitive dashboard
    * Instant webhook notifications for automated workflows
    * RESTful API for seamless integration into your existing systems

    **Comprehensive Reporting**:

    * Detailed PDF reports with verification outcomes and evidence
    * Audit trails for compliance and record-keeping
    * Customizable options to align with your operational needs

    <Note>
      *Why it matters*: Fast, accessible results empower your team to act quickly while maintaining a secure, auditable process.
    </Note>
  </Step>
</Steps>

***

## Document Requirements

For optimal verification success, documents must meet these standards:

#### General Requirements

* Government-issued and valid within its configured validity period
* Physically intact (no damage, scratches, or stains obscuring details)
* All critical information (full name, date of birth, MRZ, etc.) clearly legible
* Consistent data across all submitted documents

#### Image Requirements

* Original, real-time photo (no screenshots, scans, or digital copies)
* Supported formats: JPG, JPEG, PNG, PDF
* Maximum file size: 5MB
* Full-color image with all document corners visible
* Free from glare, shadows, digital editing, or manipulation
* Physical documents required (digital IDs supported only in select regions where officially recognized)

## Additional Settings by Country & Document Type

Configure fine-grained rules per country and document type directly from the console. These controls let you tailor acceptance criteria and transcription preferences to your compliance needs.

<Frame>
  <img src="https://mintcdn.com/didit-0f962782/z6T2GHM4Zh-iSj-K/images/id-additional-settings.jpeg?fit=max&auto=format&n=z6T2GHM4Zh-iSj-K&q=85&s=4238b10a404795a61926fbdf1a3adc20" alt="Didit ID verification additional settings panel for per-country expiration and acceptance rules" width="2602" height="1472" data-path="images/id-additional-settings.jpeg" />
</Frame>

* **Expiration mode**: Choose how to handle documents with past expiration dates.
  * **Reject expired**: If the document's expiration date is earlier than today, mark it as expired and reject.
  * **Allow expired**: Do not flag or block documents with a past expiration date.
* **Preferred character format**: Select how extracted names and fields should be normalized.
  * **Prefer Latin characters (A–Z)**: Example: "Mohammed"
  * **Prefer original script (non‑Latin)**: Example: "محمد"
* **Regional support & subtypes**: Enable documents by region and specify acceptable subtypes when a document type contains many variations.
  * Example: For United States driver's licenses, select the exact subtypes you accept (e.g., Arizona Commercial Driver License, Indiana Operator License (REAL ID), New York Enhanced Driver License, etc.).
  * Use the "Accepted subtypes" control to quickly include/exclude many variants (e.g., "128 selected").

> Tip: These settings apply per country and document type, so you can be strict in some markets while more permissive in others.

## Per-Country Age Restrictions

Enforce minimum and maximum age requirements on a per-country basis during ID verification. The system extracts the user's date of birth from the submitted document and checks it against the age limits configured for the document's issuing country.

### Configuration

Age restrictions are configured as a per-country table directly from the console:

| Column                     | Description                                                                                                                                                                                   |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Country**                | The issuing country of the document (ISO 3166-1 alpha-3). Only countries enabled in your documents allowed list are shown.                                                                    |
| **Min Age**                | Minimum age required. Users younger than this value trigger the configured action (Decline or Review).                                                                                        |
| **Max Age**                | Maximum age allowed. Users older than this value trigger the configured action. Leave empty for no upper limit.                                                                               |
| **State/Region overrides** | For countries with sub-national age variation (e.g., United States, Mexico), open the settings icon to configure per-state minimum and maximum ages that override the country-level defaults. |

### Age of Majority Defaults

The console includes an **"Apply age of majority"** button that auto-fills each country's minimum age with the known legal age of majority (18 in most countries, with exceptions such as 19 in South Korea, 21 in the UAE, 20 in New Zealand, etc.). You can then adjust individual countries or add state-level overrides as needed.

### State/Region Overrides

Some countries have different legal age thresholds depending on the state or region. When a document is scanned, the OCR system extracts the region (e.g., "Mississippi", "Alabama", "Jalisco") from the document. If a state override is configured for that region, it takes precedence over the country-level age setting.

For example, if the United States has a minimum age of 18, but Mississippi has a state override of 21, a user presenting a Mississippi driver's license will be checked against the minimum age of 21.

### Configurable Actions

When a user's age falls outside the configured range for their document's country (or state), you can choose the action:

* **Decline**: The session is automatically declined.
* **Review**: The session is flagged for manual review.

<Note>
  Per-country age restrictions also work with **Adaptive Age Verification** workflows. When a borderline case triggers ID verification fallback, the age check uses these per-country settings to make the final decision based on the document's issuing country and region.
</Note>
