For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document Verification

Scan a government-issued document, validate it server-side, and extract fields with field-level confidence scores.


Overview

Document verification asks one question: "Is the document the user submitted real, current, and unmodified?" It's the foundation of every higher-assurance flow.

The user scans the front and (where applicable) back of an identity document. 1Kosmos checks the document's security features, parses its MRZ or barcode, validates internal checksums, OCRs the printed fields, and returns a structured payload with a per-field confidence score.

What 1Kosmos checks

For every submitted document, the analyzer runs a battery of checks:

  • Image quality — focus, glare, exposure, and edge detection. Failing images prompt the user to recapture.

  • Document classification — match against the country + region + type template library to identify which document was submitted.

  • Security features — holograms, microprinting, UV patterns, ghost images, and tactile features (where capture quality permits).

  • MRZ / barcode — checksum validation and field cross-check against the visual zone.

  • Field consistency — DOB vs. age, document number vs. region pattern, expiry vs. issue date.

  • Expiry — IDs past their expiry date are rejected by default (configurable per flow).

  • Template integrity — fonts, layout, and field positions are compared against the known template for that document version. Modifications, replacements, and digital injections are flagged.

Enrolling a document in a wallet — the user experience

End users go through the same UI regardless of which document they're enrolling. The example below uses a driver's license; passport, ID card, and SSN flows are identical except where noted.

Driver's License

1

Open the Identity Wallet

The user signs in to your portal and navigates to My Profile → Identity Wallet.

2

Click Enroll on the Driver's License tile

The Driver's License tile in the Identity Wallet.

3

The user enters their mobile number with country code. 1Kosmos sends a one-time link by SMS.

4

The user taps the SMS link, lands on the verification start screen, accepts the consent, and taps Let's Get Started.

5

Scan front and back

The user holds the ID in frame. Auto-capture fires when focus, glare, and edge detection all pass. The UI flips to the back side automatically.

6

Take a selfie

The user holds the ID in frame. Auto-capture fires when focus, glare, and edge detection all pass. The UI flips to the back side automatically.

7

See it land in the wallet

Once all server-side checks pass, the document is signed into the user's wallet and the AdminX UI updates to show the new credential.

SSN enrollment requires a prior DL. You can only enroll a Social Security Number after a driver's license has been verified for the same user. The wallet uses the DL as the binding evidence.

Passport

The flow is identical to driver's license, with three differences:

  • The user is prompted for the bio-data page rather than front/back.

  • The MRZ on the bio-data page is read and cross-checked.

  • AAMVA is not performed (it's US DL-only). For US passports, no equivalent database check is run unless your flow includes a separate SSN step.

National ID Card

Same flow as driver's license. Country-specific templates determine which fields are extracted, for example, Indian PAN cards extract the PAN number, German eIDs read the chip data via NFC where supported by the device.

Social Security Number

The SSN flow is data-only, no document scan. The user enters their SSN, 1Kosmos cross-checks it against the previously enrolled driver's license, and (with proper configuration) hits the SSA / eCBSV database.

Unenrolling a document in a wallet

A user can remove a credential from their wallet at any time from the Identity Wallet tab. The credential is revoked, future relying-party requests for that document will see it as withdrawn, but past audit records remain.

Extracted fields

Every successful verification adds an extracted payload to the result. Fields available depend on document type. The most common:

Field
DL
Passport
ID Card
Notes

firstName

✓

✓

✓

lastName

✓

✓

✓

dob

✓

✓

✓

ISO-8601

documentNumber

✓

✓

✓

issuedAt

✓

✓

✓

expiresAt

✓

✓

✓

Documents past expiry are rejected by default

address

✓

partial

Country-dependent

mrz

✓

partial

Available on MRTD-compliant documents

gender

✓

✓

partial

nationality

✓

partial

Last updated

Was this helpful?