Skip to main content
Didit Raises $7.5M to Build the Infrastructure for Identity and Fraud
Didit
Back to blog
Blog · July 28, 2026

ID Verification API: Integration and Evaluation Guide

A developer-focused guide to identity verification APIs: workflow architecture, states, webhooks, evidence, security, testing, procurement criteria, and integration mistakes.

By DiditUpdated
id-verification-api-integration-evaluation-guide.png

An ID verification API lets an application collect or submit identity evidence and receive structured results about a claimed person. Depending on the workflow, it can validate an identity document, extract attributes, compare a live applicant with a reference portrait, check liveness, corroborate data, or orchestrate several checks into one session.

The API response is evidence, not a complete business decision. A production integration must also define trusted capture, customer-state ownership, status transitions, retries, review, privacy, recordkeeping, and the policy that turns technical results into approve, retry, step-up, review, or decline.

Key takeaways

  • An ID verification API is more than one endpoint. The real contract includes capture, asynchronous states, evidence, events, reconciliation, review, and deletion.
  • The backend owns the decision. A client redirect or visual success screen is not authoritative; final state should be confirmed server-side.
  • Results need scope and reasons. Document authenticity, holder linkage, liveness, quality, and contextual risk should remain separable rather than collapse into an unexplained boolean.
  • Reliability appears in failure paths. Idempotency, webhook verification, event replay, timeouts, retries, versioning, and sandbox parity matter as much as the happy path.
  • Evaluation must use production-like populations. Coverage, fraud resistance, completion, false results, review load, and privacy should be measured by document, device, geography, and relevant user segment.

What does an ID verification API do?

An ID verification API provides a machine-readable interface to identity-proofing capabilities. A typical integration creates a verification attempt, directs the applicant through a secure capture experience, receives progress or completion events, retrieves the final evidence, and applies the relying organization’s policy.

The NIST SP 800-63A-4 identity-proofing model separates three important functions:

  • Resolution: distinguish the claimed person within the relevant population.
  • Validation: determine whether identity evidence and attributes are authentic, accurate, and acceptable.
  • Verification: establish that the applicant is the subject associated with that evidence.

An API may perform one, two, or all three. Product names do not guarantee scope, so requirements should state the exact conclusion expected from every result.

ID verification API, document API, KYC API, and OCR compared

InterfacePrimary purposeUseful outputWhat it does not prove by itself
OCR APIConvert document pixels into text or fieldsExtracted name, date, number, addressAuthenticity, possession, or customer risk
Document verification APIValidate a document and its captured evidenceAuthenticity checks, expiry, field consistency, tamper indicatorsThat the current applicant owns it
Face-match APICompare a submitted face with a referenceSimilarity or match decision at a thresholdLiveness, document authenticity, or legal identity
Liveness APIEstimate live presence at biometric captureBona fide, attack, retry, or score evidenceThe person’s identity
ID verification APICombine evidence validation and applicant linkageEvidence-level results and workflow outcomeComplete KYC or business eligibility
KYC APISupport a wider customer-due-diligence flowIdentity, screening, risk, workflow, and recordsAutomatic compliance without organization policy

This distinction prevents architectural mistakes. For example, adding OCR to an upload form makes data entry faster but does not authenticate the document. Adding face match connects two images but cannot establish whether either image came through a trusted, live capture.

For the broader policy, screening, risk, and ongoing-review context around these interfaces, see the KYC lifecycle guide. This article stays at the developer trust boundary: capture, API state, evidence, events, reconciliation, and backend decisions.

Common integration models

Hosted verification session

The application’s backend creates a session and receives a short-lived URL or token. The user completes capture in a provider-hosted journey, then returns to the application. This model can reduce frontend and device complexity while preserving server-side control.

Key questions include branding, domain handoff, accessibility, localization, mobile browser support, session expiry, return behavior, and how the application resumes when the user switches devices.

Embedded web or mobile SDK

An SDK runs the capture experience inside the application. It can provide tighter interface control and access to device capabilities, but integration quality affects security. Version support, application integrity, camera permissions, virtual-camera handling, update policy, and telemetry become part of the review.

Standalone server-to-server check

The customer system sends structured data or media directly to an endpoint. This is useful for already-trusted captures, batch operations, or individual modules. It also moves responsibility for capture integrity, consent, quality, payload security, and replay prevention toward the integrator.

Orchestrated workflow

One session can branch across document validation, database checks, liveness, face matching, screening, device signals, and manual review. The API should expose the workflow and policy version so the same status can be interpreted later.

A secure integration sequence

1. Create the attempt from the backend

The trusted backend generates an internal customer reference and calls the provider with the required workflow, locale, and policy context. Do not expose permanent API credentials in browser or mobile code.

Use an idempotency strategy for create operations. A client timeout should not create a second billable attempt or detach the result from the original customer.

2. Issue a short-lived capture handoff

Give the frontend only the scoped token or URL needed for that attempt. Bind it to the expected application, customer reference, workflow, and expiry. Avoid putting unnecessary personal data in URLs, analytics events, or client logs.

3. Capture and validate evidence

Guide the user through supported evidence and quality requirements. Separate recoverable quality problems from suspected attacks. “Move closer,” “document expired,” and “capture integrity failed” should not become one generic error.

4. Receive an authenticated event

Treat webhooks as untrusted input until verified. Validate the event signature or message authentication, timestamp or freshness control, expected destination, content type, and event identifier. RFC 9421 defines a general mechanism for HTTP Message Signatures, although a provider may use a different documented signing scheme.

Store event identifiers and process them idempotently. Delivery systems retry; duplicate events are normal. Do not assume arrival order, and do not let an older event move a customer backward from a terminal state.

5. Retrieve the canonical result

After a completion event, fetch the final attempt from the provider API. This reconciliation step reduces reliance on the contents of a single webhook and recovers from missed or delayed delivery.

6. Apply organization policy

Map structured evidence into the organization’s own decision states. The provider may recommend an outcome, but the relying organization knows the product, customer history, legal basis, risk appetite, and available recovery paths.

7. Record the transition

Persist the internal customer reference, provider attempt identifier, workflow and version, relevant evidence or references, reason codes, event history, policy version, reviewer action, and final rationale. Minimize copied sensitive data when a durable reference is sufficient.

The state model an API should expose

A boolean verified field is too small for a real customer journey. Useful states often include:

StateMeaningTypical application action
CreatedAttempt exists but capture has not begunPresent or resend the secure handoff
In progressUser or asynchronous checks are activeWait; do not grant final access
Awaiting inputMore evidence or user action is requiredShow precise recovery guidance
Retry allowedCapture or quality failed recoverablyStart a bounded new attempt
Under reviewA trained reviewer owns the caseKeep access pending and expose expected next step
ApprovedRequired evidence met the configured workflowApply organization policy and state transition
DeclinedEvidence failed a defined controlApply appeal, restriction, or alternate path
Expired or abandonedAttempt ended without a decisionAllow controlled restart
Technical errorSystem could not produce evidenceRetry or reconcile without treating it as fraud

Every terminal status should have structured reasons. Stable machine codes allow policy and analytics; localized human messages help users and reviewers. RFC 9457 provides a standard format for machine-readable HTTP problem details at the interface level.

What evidence should the result contain?

Document-level evidence

Include the evidence type, issuing country, document class, expiry, field consistency, quality, and validation indicators relevant to the method. Make clear whether the result came from optical inspection, chip data, issuer or database corroboration, or another source.

Applicant-linkage evidence

Keep face comparison, liveness, capture integrity, and identity-attribute linkage separate. Record the reference used and the decision threshold or version needed for later interpretation without exposing unnecessary biometric material to every consumer.

Risk and operational evidence

Device, IP, velocity, repeated-attempt, or workflow signals can guide step-up and review. They should not silently change identity attributes. Preserve which subsystem produced each reason.

Provenance and version

Results can change when models, document templates, watchlists, or policy change. Store the provider version, workflow version, decision time, source references, and whether a human reviewed the case.

API security requirements

Identity APIs process valuable personal and biometric data and expose business flows attackers can automate. The OWASP API Security Top 10 highlights risks directly relevant here: broken object authorization, broken authentication, excessive property exposure, unrestricted resource consumption, sensitive-flow automation, poor API inventory, and unsafe trust in third-party APIs.

Authentication and authorization

Use separate credentials and applications for test and production. Apply least privilege, rotation, revocation, environment isolation, and object-level authorization. An authenticated organization should not be able to retrieve another organization’s attempt by changing an identifier.

Upload and resource controls

Validate media type, size, dimensions, structure, and expected source. Set timeouts, concurrency limits, rate controls, and attempt limits. Verification calls consume compute and can carry a per-check cost, making unbounded endpoints both a denial-of-service and cost risk.

Data exposure

Return only the fields a consumer needs. Separate operational roles so support, analysts, developers, and administrators do not all receive full identity evidence by default. Redact sensitive payloads from logs and observability tools.

Webhook and replay controls

Authenticate events, preserve the raw body required for signature verification, reject stale or malformed deliveries, deduplicate event identifiers, and fetch canonical state. Rotate webhook secrets without breaking in-flight delivery.

Inventory and versioning

Document every active endpoint, version, host, credential, callback, SDK, and deprecation date. A shadow test endpoint with production data or an old unmaintained SDK can undermine the reviewed path.

How to test an ID verification API

Contract and state tests

Exercise every documented state, reason, retry, timeout, and terminal transition. Verify pagination, filtering, error bodies, backward compatibility, and unknown-field behavior. Simulate duplicate and out-of-order webhooks.

Evidence tests

Use permitted, representative samples across the document types, countries, scripts, expiry conditions, devices, cameras, and networks in the expected population. Track unsupported, unreadable, mismatched, manipulated, and genuine evidence separately.

Fraud tests

Build an authorized attack set for replays, printed evidence, altered documents, virtual cameras, emulators, injected media, repeated identities, and automated attempts. The NIST remote-proofing requirements distinguish capture-sensor confidence, forged-media analysis, protected channels, and biometric comparison because no one mechanism covers the full path.

Operational tests

Measure completion, retries, abandonment, manual-review rate, time to resolution, support contacts, webhook delay, reconciliation, and availability. Break results down by document, device, network, language, and relevant customer group.

Decision-quality tests

Do not compare providers with one “accuracy” number. Review false accepts and false rejects at the intended threshold, attack-specific results, sample counts, confidence, no-response cases, and downstream confirmed outcomes.

Privacy and deletion tests

Verify retention configuration, export, deletion, access logs, regional handling, subprocessor controls, and behavior when a deletion request arrives during an open review or legally required hold.

How to evaluate providers

Scope and assurance

Which proofing functions are included? What assurance models and independent tests apply? Which components and versions were tested? Can the provider explain what a pass does and does not mean?

Coverage

Ask for a country-and-document matrix, not a total alone. Test the evidence your customers present, including older devices, multiple scripts, lower-quality cameras, and uncommon but legitimate documents.

Developer experience

Review API consistency, OpenAPI quality, SDK maintenance, examples, sandbox scenarios, webhook tooling, changelog discipline, migration policy, status page, and support escalation. A five-line happy-path sample is not a production integration guide.

Operations and explainability

Inspect review queues, evidence views, role permissions, audit logs, reason codes, appeals, and exports. Confirm that humans can distinguish technical failure, quality retry, likely attack, and identity mismatch.

Commercial and portability

Understand success-based versus attempt-based billing, review fees, minimums, limits, storage, regional options, and exit terms. Keep your internal customer reference and policy boundary portable so a provider change does not require rewriting account state.

Common integration mistakes

Granting access from the return URL

The user controls the browser path. A success redirect is interface state, not proof. Confirm final state from the trusted backend.

Treating every failure as fraud

Permission denial, timeout, unsupported evidence, blur, and suspected manipulation are different. Mixing them creates false declines and unusable analytics.

Processing webhooks exactly once

Networks cannot promise exactly-once delivery. Design for at-least-once events with deduplication, monotonic transitions, and canonical retrieval.

Logging complete payloads

Convenient debug logging can copy documents and biometric data into systems with wider access and longer retention. Use identifiers, structured reasons, and controlled evidence access.

Testing only the sandbox success case

Production failures occur in retries, old devices, edge documents, event delay, version changes, and review. Make failure scenarios part of the acceptance suite.

Outsourcing the policy decision

A vendor result cannot know every jurisdiction, customer type, product risk, or business restriction. Preserve the organization’s decision logic and accountability.

An implementation checklist

Before production, confirm that:

  • API credentials remain server-side and are scoped by environment and role;
  • create calls are idempotent and mapped to stable internal customer references;
  • capture tokens are short-lived and bound to the expected attempt;
  • every state and reason has an explicit customer and backend action;
  • webhook signatures, freshness, duplicates, and ordering are tested;
  • canonical retrieval reconciles missed or delayed events;
  • evidence-level outputs remain separate from the final customer decision;
  • rate, upload, concurrency, and attempt controls resist automated abuse;
  • document, device, fraud, privacy, accessibility, and review tests use production-like samples;
  • retention, deletion, incident response, versioning, and migration have owners.

Using Didit for ID verification

Didit provides ID Verification as a composable module and lets teams add Liveness Detection, Device and IP Analysis, and conditional paths through the Workflow Orchestrator. The published standalone ID Verification price is $0.15, while the published $0.33 KYC bundle combines ID Verification, Passive Liveness, Face Match, and IP Analysis.

The pricing page lists current module rates, and the free tier is 500 free verifications per month. Those product results should feed a backend-owned policy and customer state rather than replace them.

Frequently asked questions

What is an ID verification API?

It is a programmatic interface for collecting or submitting identity evidence and receiving structured results about evidence validity and the applicant’s link to a claimed identity.

Is an ID verification API the same as a KYC API?

Not necessarily. ID verification focuses on identity evidence and holder linkage. A KYC API may also include screening, customer risk, workflows, review, records, and ongoing refresh.

Should identity verification run from the frontend?

The capture interface may run in the frontend, but permanent credentials, session creation, final result retrieval, policy decisions, and customer-state changes belong in a trusted backend.

Why are webhooks needed?

Many checks and reviews are asynchronous. Webhooks notify the application of changes, while a retrieval endpoint provides the canonical state for reconciliation.

How should duplicate webhooks be handled?

Verify each event, store its identifier, process it idempotently, prevent older states from overwriting newer terminal states, and retrieve the canonical attempt when necessary.

What should a sandbox include?

It should reproduce the production contract and provide deterministic cases for success, retry, decline, review, expiry, technical error, duplicate events, delayed events, and relevant reason codes.

Can an API make a company compliant?

No. An API can supply evidence and workflow results. The organization remains responsible for legal analysis, policy, customer decisions, exceptions, records, privacy, and ongoing controls.

Primary references

A strong ID verification integration makes every trust boundary explicit: who creates the attempt, how evidence is captured, which result is canonical, how events are authenticated, what each reason means, and which system owns the final customer decision.

Infrastructure for identity and fraud.

One API for KYC, KYB, Transaction Monitoring, and Wallet Screening. Integrate in 5 minutes.

Ask an AI to summarise this page