A document verification API can automate much of identity onboarding, but a reliable decision requires more than OCR. This checklist explains how to validate captured documents, extracted data, authenticity signals, biometric checks, privacy controls, and review outcomes without treating a single confidence score as a final answer.
Overview
A document verification workflow typically combines document capture, image analysis, optical character recognition (OCR), document classification, data consistency checks, authenticity signals, and—when appropriate—selfie matching or liveness checks. The application then converts those results into an operational outcome such as pass, retry, refer, or reject.
The goal is not to make every verification decision fully automatic. The goal is to create a proportionate, explainable process that accepts usable evidence, requests better evidence when capture quality is the problem, and routes uncertain cases to a trained reviewer.
Before integrating an ID verification API, define four things:
- Evidence: Which document types, fields, images, and biometric signals are required?
- Rules: Which results are mandatory, advisory, or suitable only for manual review?
- Outcomes: What causes a pass, retry, refer, or reject decision?
- Controls: How will sensitive images, extracted identity data, audit records, and vendor responses be protected and retained?
Keep the API contract separate from the business decision. The provider may return a score or status, but your application should record the individual checks that support the outcome. This makes troubleshooting, review, and future provider changes more manageable. For the surrounding integration, apply the same discipline described in the API Contract Validation Playbook.
Checklist by scenario
1. Document capture
Start by validating whether the submitted images are usable before attempting to interpret them. Check that the expected number of sides or pages is present, the document is inside the frame, and text is not obscured by glare, blur, shadows, fingers, cropping, or extreme perspective.
- Confirm accepted file types, image dimensions, and maximum payload size.
- Require front and back images when the document type uses both sides.
- Detect duplicate images, blank uploads, screenshots, and unsupported formats where the provider supports those checks.
- Give the user a specific retry instruction, such as moving to even lighting or placing the document on a plain surface.
- Offer an accessible alternative to camera-only capture when the workflow allows it.
2. OCR and field extraction
OCR identity verification should produce structured fields only after the image passes basic quality checks. Extract the fields needed for the business purpose rather than collecting every available field by default. Typical fields may include name, date of birth, document number, issuing country, issue date, expiry date, and address, depending on the workflow.
- Store the raw OCR value and a normalized comparison value when legally and operationally appropriate.
- Preserve field-level confidence or quality information if supplied by the API.
- Handle transliteration, diacritics, compound names, hyphens, and differing name order deliberately.
- Do not treat OCR output as proof that the document is genuine.
- Flag missing or conflicting mandatory fields for retry or review rather than silently filling them.
3. Data consistency and expiry checks
Compare related signals instead of relying on one field. For example, compare printed document data with the machine-readable zone when available, and compare the document’s date of birth with data supplied elsewhere in the onboarding form. A mismatch may indicate an altered document, an OCR error, a legitimate name variation, or a user-entry mistake.
- Check whether the document is expired on the verification date.
- Validate date formats and reject impossible dates before comparison.
- Define how close matches are handled for names, addresses, and transliterated characters.
- Distinguish a missing value from a contradictory value.
- Record which comparison failed and whether the source was user-entered, OCR-derived, or provider-derived.
4. Authenticity and tamper signals
Authenticity checks can examine visual features, security patterns, machine-readable zones, metadata, or inconsistencies between document regions. Treat these as a collection of signals, not as an absolute guarantee. A result such as “unable to verify” is different from a clear contradiction, and both should be mapped deliberately in your decision policy.
| Check area | What it can support | What it cannot establish alone |
|---|---|---|
| Image quality | Whether analysis is feasible | That the document is genuine |
| OCR consistency | Whether fields agree across readable regions | That the person owns the document |
| Document security signals | Whether expected features appear consistent | That every form of alteration has been detected |
| Expiry and issue dates | Whether the document meets date rules | That the identity is currently present or entitled |
| Provider confidence | How strongly the system supports a result under its model | A universal pass or reject threshold |
5. Selfie matching and liveness
Use selfie matching and liveness only when they serve a defined risk or onboarding requirement. Selfie matching compares a face in a live or captured image with the document portrait; liveness is intended to help distinguish a live subject from a presentation or replay attempt. They answer different questions and should not be collapsed into one result.
- Define whether a failed check causes a retry, referral, or rejection.
- Provide clear capture instructions and an accessible fallback where possible.
- Monitor failure patterns by device, lighting condition, document type, and user journey stage.
- Do not use a biometric result to compensate for an expired, unreadable, or inconsistent document.
6. Human review
Manual KYC review is most useful when automated signals are incomplete or contradictory, not as an undefined “anything unusual” queue. Give reviewers the evidence needed to make a consistent decision, including the document images, extracted fields, failed checks, provider reasons, and relevant user-entered data.
- Use a review checklist with required reasons for pass, refer, and reject decisions.
- Limit reviewer access to the minimum sensitive data needed.
- Record reviewer actions and escalation paths.
- Separate a technical retry from a substantive identity concern.
- Review the queue for recurring document types or failure reasons that require workflow changes.
Decision matrix for pass, retry, refer, and reject
A staged outcome model prevents weak image quality from being treated like suspected fraud. The exact thresholds depend on your use case, document coverage, risk tolerance, and applicable obligations, so document the rationale rather than copying a provider’s default.
| Outcome | Typical conditions | Next action |
|---|---|---|
| Pass | Required images are usable; mandatory fields are extracted; dates and key data are consistent; authenticity checks provide sufficient support; additional checks, if required, succeed. | Complete onboarding and retain the decision evidence according to your documented policy. |
| Retry | Blur, glare, cropping, missing sides, unsupported document type, failed camera capture, or incomplete user entry prevents reliable analysis. | Explain the specific problem, request new evidence, and avoid counting a technical retry as a rejection. |
| Refer | Signals conflict, document coverage is uncertain, a name variation needs interpretation, or automated confidence is insufficient for an unattended decision. | Send to trained review with the reason and supporting evidence. |
| Reject | Required evidence is clearly invalid, the document is outside policy, mandatory data conflicts materially, or a documented risk rule is met. | Record the rule and reason, communicate an appropriate user-facing message, and provide an escalation path where required by your process. |
Keep user-facing messages concise and non-accusatory. Internally, preserve a more precise reason code. This supports support teams, analytics, and audit work without exposing sensitive detection logic unnecessarily.
What to double-check
- Document coverage: Confirm the provider supports the document types, issuing regions, languages, scripts, and sides required for your launch. Treat a new country or document version as a coverage change, not a minor configuration update.
- Confidence definitions: Ask what each score measures, whether scores are field-level or decision-level, how “unable to verify” differs from “failed,” and whether thresholds can change between API versions.
- Webhook security: Verify signatures, timestamps, replay protection, idempotency, and event ordering. Do not trust a browser redirect as the authoritative result.
- Failure handling: Design timeouts, provider outages, partial responses, duplicate submissions, and delayed manual reviews. A temporary service failure should not automatically become a user rejection.
- Privacy controls: Minimize collected fields, encrypt data in transit and at rest, restrict staff access, define retention and deletion behavior, and avoid placing document images or identity numbers in ordinary application logs. The Validation Audit Trails guide provides a useful framework for recording evidence without over-logging.
- Retention and access: Align storage periods, deletion jobs, export processes, and reviewer permissions with your documented compliance requirements. Recheck these controls using the KYC Data Retention and Verification Audit Checklist.
- Accessibility and recovery: Test keyboard navigation, readable instructions, camera permissions, low-bandwidth behavior, device changes, and a recovery path when capture repeatedly fails.
- Observability: Track completion, retry, referral, rejection, latency, provider errors, and drop-off by workflow stage. Use aggregated operational data where possible and avoid unnecessary exposure of identity content.
Common mistakes
- Using OCR as authenticity proof. OCR tells you what the system could read. It does not independently establish that the document is genuine or that the presenter is its rightful holder.
- Building one universal threshold. A score that works for one document family, capture method, or risk tier may not be appropriate for another. Define thresholds with documented testing and review outcomes.
- Rejecting every uncertainty. Unreadable images and unsupported formats usually call for a retry or referral. Automatic rejection can create avoidable friction and hide technical defects.
- Ignoring normalization. Names, addresses, dates, and scripts can appear in valid variations. Compare values using explicit rules and retain the original values for review.
- Leaving manual review undefined. Without reviewer guidance, two people may interpret the same evidence differently. Specify allowed evidence, reason codes, escalation, and quality checks.
- Logging sensitive payloads. Full API responses and document images often contain more personal data than debugging systems need. Redact, tokenize, or sample safely.
- Testing only the happy path. Include expired documents, glare, missing pages, altered fields, duplicate submissions, webhook retries, provider timeouts, and users who cannot complete biometric capture.
When to revisit
Review the integration before launching in a new region, adding a document type, changing identity or risk policy, replacing a provider, or introducing selfie and liveness checks. Revisit it after an API version change, a material change in provider coverage, a recurring increase in retries or referrals, or a pattern of support complaints.
Use seasonal planning cycles to inspect review capacity, escalation response times, storage consumption, and provider rate limits before onboarding volume changes. Compare outcomes by workflow stage rather than looking only at the final pass rate: a rise in capture retries suggests a user-experience or device issue, while a rise in referrals may indicate coverage, threshold, or reviewer-capacity problems.
Before each review, run this short action list:
- Export the current document coverage and provider configuration.
- Sample recent pass, retry, refer, and reject decisions using approved privacy controls.
- Check whether reason codes still describe the actual failure modes.
- Test webhook verification, idempotency, timeout handling, and deletion workflows.
- Review accessibility feedback and manual-review consistency.
- Update the integration contract, run regression tests, and record the decision owner.
A document verification API is one component of an identity verification workflow, not a substitute for policy, review operations, or data governance. Keeping the technical checks, decision rules, and evidence controls explicit makes the process easier to operate today and safer to change when tools, documents, or onboarding requirements evolve.