Core Concepts
Understanding Xident's key concepts will help you build the best verification experience for your users.
Xident ID
A Xident ID is an account a person holds with Xident. It enables the "Verify Once, Access Everywhere" model.
How It Works
- The person creates a Xident account in the Xident portal and verifies a government ID there once, with a liveness check and a face match.
- The account's age comes only from the date of birth on that document. It is computed each time a site asks, so it stays correct as the person gets older.
- On a site that uses Xident, the person signs in to their Xident account in the widget instead of showing a document again.
- The site gets a pass or a fail for the minimum age of the session, checked exactly against the document's date of birth, and pays the lower Xident ID rate.
A verification on a site never gives an account an age. Only the ID verification in the portal does.
User Control
Users can:
- View their authorized OAuth apps in the Xident portal
- Revoke OAuth consent for specific apps
- Delete their Xident ID entirely
Verification Paths
Xident runs four verification paths today, automatically selected based on user context. A fifth, the EU Digital Identity Wallet, is planned and not available yet (Path E).
User arrives at site
|
v
+------------------+ +------------------+
| Has Xident ID? |--Yes->| Path D: Token | (instant, cheapest)
+--------+---------+ +------------------+
| No
v
+------------------+ +------------------+
| Restricted |--Yes->| Path C: Document | (always OCR)
| country? | +------------------+
+--------+---------+
| No
v
+------------------+ +------------------+
| ML age check |--Pass>| Path A: ML Fast | (client-side, no images sent)
+--------+---------+ +------------------+
| Fail
v
+------------------+
| Path B: Document | (OCR fallback -> Xident account funnel)
+------------------+
Path A: ML Fast
Client-side verification using machine learning. Face images never leave the browser.
- Liveness Detection: Ensures a real person is present (not a photo/video)
- Age Threshold Classification: Binary ML classifiers determine if the user is above the required age threshold (+12, +15, +18, +21, +25) via ONNX Runtime in WebAssembly
- No face image is sent to the server. It receives the result of the check (pass or fail, with the model's age estimate) and technical data about the capture: the confidence, brightness statistics, model and run details, and the liveness action results. The verification screens also send technical events (for example the screen reached, the camera state and error codes), with no images and no data read from the document; only Xident staff can see them
Path B: Document Fallback
Some people old enough for the site are refused by the face check. For how often, at each minimum age and at the two named strictness settings, see the accuracy page. A refused person goes on to document verification where the tenant's plan and the session have one (otherwise the user cannot continue):
- Document OCR: ID document uploaded and processed server-side
- Face Match: Document photo matched against liveness frame
- This is the registration funnel: after the document step, users are invited to create a Xident account. The account gets its age from one ID verification in the Xident portal, and then the person can skip the document on the next site
Path C: Compliance
For restricted countries where ML false positive rates are insufficient for regulatory requirements:
- Always requires document verification regardless of ML result
- Ensures compliance with local age verification regulations
Path D: Xident Token
For returning users whose Xident account holds a verified government ID. The account's age is computed from the document's date of birth when the site asks:
- Instant verification — no camera, no documents
- Also offered when the site asked for
verification_mode: document, because the account's age was itself proven with a document and a face match. The result then saysverification_type: xident_id. - Not offered for an ID verification (
purpose: id_verification), for a session that asked for a data match (expected), or once a document was submitted for the session. The person then continues with the document flow. - Token lookup only, 60-80% cheaper than full verification
- Same trust level as full verification
Path E: EU Wallet (planned)
Xident does not accept age proofs from the EU Digital Identity Wallet today. Support is planned, with no date set.
- The widget sends no wallet request: it shows no wallet screen and no wallet button.
- A wallet result stored on a session does not complete the session.
- A person without a Xident ID goes through the face age check or the document check (Paths A to C).
- The API Reference lists wallet endpoints, and the result keeps its
checks.eu_walletentry and theeu_walletvalue ofverification_type, because they are part of the API v1 shape. Do not build an integration on the wallet path yet.
Privacy and Compliance
Privacy Architecture
- ML Fast path: Face images never leave the browser
- Document path: the document photos and the selfie are deleted within 24 hours
- For a document-path session whose selfie gave a face embedding, the server keeps that 512-dimensional embedding (not reconstructable to a face) for the retention you choose in the dashboard under Settings > Data retention (0, 30, 90, 180 or 365 days, default 365). No embedding is stored when the selfie gave none, with 0 days, or when your setting cannot be read at that moment. The period is fixed when the embedding is stored: raising the setting later does not extend an older one, and lowering it deletes older ones
- Other face embeddings follow their own rules: a blacklist entry's embedding is kept until you remove the entry, and deleted 30 days after that; a Face 2FA enrollment's embedding is kept until the enrollment is deleted
- The details read from the document (name, date of birth, document number) are stored encrypted and deleted 90 days after the session
- A perceptual hash of the document image (a fingerprint that spots the same document being used again, not the image) is kept for 396 days
- The IP address and browser (user agent) of a session are kept for 90 days. The dashboard's verification logs show the IP address
- If the person creates a Xident account, the date of birth, document country and document type from their ID are kept with the account until the account is deleted
- Your integration (the result API and webhooks) never receives the actual age or the date of birth: it receives pass or fail for each check and, where they apply, match or mismatch for data you sent, the document type and country, the country of the IP address, and a risk band. In the dashboard, staff who review a document see the details read from it, date of birth included, and the verification logs show the browser check's age estimate
ARCOM Compliance (Unlinkability)
French Regulatory Compliance
Xident satisfies the French ARCOM unlinkability requirement: age verification does not link users to the platforms they visit. There is no account_connections table — Xident never records which sites a user has verified on. The portal's "Authorized Apps" page shows only OAuth consent grants (for "Login with Xident"), not verification history.
Verification Types
Full Verification
First-time verification with ML processing:
- Liveness Detection: Ensures a real person is present (not a photo/video)
- Age Threshold Classification: ML model determines if user is above required age threshold (+12, +15, +18, +21, +25)
- Document Verification: OCR extraction from ID documents (fallback)
Token Verification
Returning user verification using Xident ID:
- Instant, no UI required
- 60-80% cheaper than full verification
- Same trust level as full verification
EU Wallet Verification (planned)
Not available today. See Path E: EU Wallet (planned).
Face 2FA
Per-site facial authentication — a second factor keyed by your user id, separate from Xident ID:
- Register a user's face once:
POST /verify/v1/2fa/registerwith{ user_id, image }. - Verify a later login:
POST /verify/v1/2fa/verifywith{ user_id, image }. - Both are asynchronous — they return a
challenge_id; pollGET /verify/v1/2fa/status/{id}for a pass/fail result (never a raw score). - The comparison is an exact 1:1 match against the one stored embedding — accuracy doesn't drift as your user base grows.
- Registration is free; each decided verify bills as one Check, and a verify for a user who is not enrolled counts as decided. Delete a user's enrollment (GDPR) with
DELETE /verify/v1/2fa/users/{user_id}. - Faces are stored as 512-dimensional vectors, never as images.
Blacklist Check
A per-tenant fraud deny list. Once a face is on your blacklist it automatically fails any future verification or Face 2FA check for your account (reason blacklist_match):
- Add by session:
POST /verify/v1/blacklist/sessionwith{ session_token, reason }— blacklists the person from one of your completed document verifications, for as long as your data retention setting keeps that session's face embedding (at most 12 months). Without a stored embedding (for example with 0 days), blacklisting works only while the session's selfie is still stored (deleted within 24 hours of upload; about 23 hours by default), and only if the session took a selfie. - Add by image:
POST /verify/v1/blacklist/imagewith{ image, reason }. - Both are asynchronous; the entry appears in
GET /verify/v1/blacklistonce processed. Remove withDELETE /verify/v1/blacklist/{id}. - You submit a session or an image — never a raw face vector (that would let a crafted vector poison your own matching). The embedding is always derived server-side, and list responses never include embeddings.
- Your blacklist is private to your account; it never affects other Xident customers.
Sanctions & PEP Screening
On document verifications, the identity extracted from the ID can be screened against the consolidated OpenSanctions dataset — global sanctions programs, politically-exposed persons, and watchlists, 400+ sources refreshed nightly. Screening runs entirely inside Xident's own EU infrastructure; no third-party screening vendor is called and the screening never leaves it. Reading the document before that is different: it uses outside AI vision providers, which receive the document image (see the sub-processor list).
- The outcome appears in every result as
checks.aml— the same{performed, passed}shape as the other checks.performed: falsemeans screening did not run (non-document session, or not enabled for your plan). - A match never auto-rejects. A strong match routes the session to your review queue with reason
aml_matchand the match context (matched name, score, source lists) for your reviewer. Name matching is fuzzy by nature — a person is only ever rejected by a person. - Screening is a control inside your compliance program: Xident flags and routes; your team decides; your obligations under applicable AML law remain your own.
Data match
If you already hold identity data about the user — from your signup form, your KYC record, your customer file — send it at init as expected and Xident tells you, per field, whether the document the live person presented agrees with it. The values never come back; only verdicts do.
- Send any subset of
first_name,last_name,date_of_birth(YYYY-MM-DD),document_numberandnationality(ISO alpha-2). The session must read a document: usepurpose: id_verificationorverification_mode: document, or init is refused withEXPECTED_REQUIRES_DOCUMENT. - The outcome appears as
checks.data_match—{performed, passed, fields}, wherefieldscarries one verdict per field you asked about:match,mismatch, ornot_on_document(the document does not carry that field, for example nationality on a US driver's licence).passedis true only when every requested field matched. - Absent means not performed. Unlike the other checks,
data_matchis omitted when you sent noexpected, when no document was read, or when the session failed with reasondata_match_unavailable. Gate onpassed === true; that fails closed. - The data you sent stays with the session when the person reloads the page, and with a retake. If it is no longer available when the document is read, the session fails with reason
data_match_unavailable. A session that asked for a data match never passes without one. - Each field is compared against every zone of the document Xident reads: the printed text, the machine-readable zone (the issuer's own Latin spelling, with check digits), and the barcode on North American licences. Names tolerate accents, punctuation, a missing middle name and a single misread letter on longer names; dates and document numbers must match exactly after normalising the format.
- A mismatch never auto-fails a session. With
mismatch_policy: report(default) it is recorded and the verification completes as it otherwise would; withreviewthe session goes to your review queue with reasondata_mismatch, and your reviewer sees the per-field outcomes. Names are fuzzy by nature — a wrong read must not terminally fail a real person. - The claims are stored encrypted for at most 24 hours and never reach the user's browser.
Fraud Risk Band
Document verifications also carry an optional top-level risk object — {"band": "low" | "elevated" | "high"} — an aggregate of the document and capture analysis Xident already performs on the session.
- The band is a closed set you may switch on; any addition would be announced in the changelog first.
- When the key is absent, no document-path signals ran (browser-only checks, wallet sessions) — absent is a weaker claim than
"low"; don't treat a missing band as an assessed-clean document. - There is deliberately no numeric score on the API: a precise score would let a fraudster iterate a forgery against the number. The per-signal detail behind the band is visible to your reviewers in the dashboard.
- A
highband never auto-fails a session — it informs your own review and risk decisions.
Tokens
A verification flow involves two different tokens — don't confuse them:
- Init token (
xit_…): created by your server withPOST /verify/v1/initand carried in the verification URL as?t=. It holds every setting of the session, and it lives 10 minutes. Opening the link again in that time, for example with a page reload, starts the verification again with the same settings. The widget sends it in theX-Init-Tokenheader when it creates the session. It never appears in your callback. - Result token (
xtk_…): returned to your callback URL as?token=after verification. You pass it toGET /verify/v1/result/{token}to read the outcome. Reading it does not use it up: you can read the same result again. If one result must open only one thing on your side, record the tokens you have accepted.
Result Token Lifecycle
Verification Complete
|
v
+-------------------+
| Result token | --- xtk_… returned to your callback (see expires_at)
+--------+----------+
|
v
+-------------------+
| Backend reads it | --- GET /verify/v1/result/{token}
+--------+----------+
|
v
+-------------------+
| You record it | --- the result can be read again
+-------------------+
Token Properties
- Not consumed: reading a result does not invalidate its token, and opening the widget does not invalidate the init token. The init token works until it expires
- Short-lived: the init token expires in 10 minutes. The
expires_atyou get back is the deadline to finish the verification, not a limit on reading the result: a completed result can still be read after that time. If your site needs a fresh result, check the result's completion time yourself, and record every token you accept so a second use is refused - Tamper-proof: opaque, randomly generated, server-validated
Result Status Values
This is the canonical status vocabulary for three surfaces that all share it: GET /verify/v1/result/{token} (tenant result), GET /verify/v1/status/{token} (subject/widget status), and every session.*/review.* webhook's data.status. It is a different, narrower set than the callback redirect's ?status= query parameter (see Getting Started, Step 4) — the callback only ever reports a terminal verdict (success, failed, or canceled), while the values below cover the whole session lifecycle, including states no callback ever fires for.
| Status | Description |
|---|---|
pending | Session created; the user hasn't started the verification flow yet |
in_progress | The user is actively going through liveness/age/document capture |
success | Passed — the required age threshold and every required check succeeded |
failed | Explicitly failed (threshold not met, document or face mismatch, fraud-list match) |
canceled | Canceled by the user or the client before completion (note the single-L American spelling) |
expired | The session's TTL elapsed (~30 minutes) before it reached a terminal state. Nobody's browser is still open to redirect at that point, so this value never appears in a callback — only via a later GET /result/GET /status call or a webhook |
pending_tenant_review | Non-terminal. The verification ran and produced something a human must adjudicate (see review.created below) — the session is parked awaiting that decision |
awaiting_retake | A tenant reviewer asked for a retake (blur, glare, partial capture) rather than a final rejection — the widget lets the user recapture in a new, linked session |
retaken | This session was the original attempt in a retake chain and has been superseded by a newer session — query the new session's token for the current outcome |
Your sessions are never linked to a Xident account. Creating a Xident account, or signing in to one, links no session. The Xident portal starts its own ID verification for the signed-in account, and claims only that session, and only for that account. A passed verification keeps reporting success.
API Keys
Xident uses a Stripe-style dual key model. You have two types of API keys:
Secret Key (sk_*) — the one you need
- Used in backend only (Node.js, Python, PHP, Go)
- Never expose in client-side code
- Authenticates the whole flow:
POST /verify/v1/initandGET /verify/v1/result/:token - Starts with
sk_live_, orsk_test_in a test project. A key created with restricted scopes starts withak_live_orak_test_instead.
Public Key (pk_*): used by the widget
- The Xident widget uses it in the browser, together with the init token, to create the session and run the checks
- Cannot start a verification:
POST /verify/v1/initanswers403 SECRET_KEY_REQUIRED - Cannot read verification results
- Starts with
pk_live_, orpk_test_in a test project - You do not need to use it yourself
Auth Header
Your server sends its key in the X-API-Key header:
X-API-Key: sk_live_...
Environments
Xident runs one API for live and test projects. You choose the mode when you create a project in the dashboard: switch on Test mode key for a test project. A live project has sk_live_, pk_live_ and ak_live_ keys, a test project sk_test_, pk_test_ and ak_test_ keys. Starting a verification and reading its result work the same with both; only the key changes. Some endpoints refuse a test key: the document upload (/ocr/…), /tokens, the wallet and Face 2FA.
- Live keys run real verifications and real webhooks. On the Free plan they spend a one-time credit (1,000 Checks and 100 document Verifications) instead of a card. Upgrading to a paid plan changes billing only; there is nothing to re-integrate.
- Test keys run no verification. A test session gets its result as soon as the widget opens the link, with no camera step. It is never billed, the webhooks are sent as usual, and the result carries
test: true. Never grant access on a result withtest: true. - A key reads only sessions of its own mode: a test key reads test sessions, a live key reads live sessions.
Isolating staging from production
Create two projects. Each has its own key pair, its own webhook endpoint and its own signing secret. Point one at your staging URL and one at production. http://localhost:* callback URLs are accepted, so local development needs no tunnel or HTTPS certificate.
Testing each decision branch
With a test key, the outcome follows the user_id you send to POST /verify/v1/init:
- Pass: any
user_id. The session passes with reasontest_mode. - Fail: a
user_idthat ends in+fail, for exampleuser-123+fail. The session fails with reasontest_mode.
With a live key, verifications are real, so there are no fixture identities that return canned verdicts. The real outcomes are still reachable:
- Pass: a real document and a matching selfie.
- Fail, identity not matched: one person's document with a different person at the selfie step gives
face_mismatch. - Undecidable: a deliberately blurred or part-cropped document gives
document_unreadableordob_unreadable. These are not billed: charges apply to decisions, not attempts.
The minimum age of a session is 12 to 25, so a live failure for age needs a person below that age. In Auto Mode it is the local rule's age for the person's country, or your own age where that is higher (see Minimum age and Auto Mode). Use a test key and a user_id ending in +fail to test your failure branch.
Webhooks
Receive real-time notifications for verification events. Configure endpoints in your Dashboard; the shared secret (whsec_…) is shown once, at creation time.
Event catalog
| Event | Description |
|---|---|
session.success | User passed — the required threshold and every required check succeeded |
session.failed | Verification was explicitly failed by the server (threshold not met, document or face mismatch) |
session.canceled | The client canceled an in-progress verification |
session.expired | Reserved for a session whose TTL elapses without completion — subscribable today, but not currently emitted by the server |
review.created | A session landed in the tenant review queue and needs a human decision |
review.approved | A reviewer approved a queued session |
review.rejected | A reviewer rejected a queued session |
test | Sent by the "Test webhook" button in the dashboard |
These are the only event types Xident sends. session.completed is a deprecated legacy alias for session.success — endpoints that subscribed to it before the 2026-07 rename keep receiving the pass event, spelled the old way, so nothing breaks. New endpoints should subscribe to session.success directly. If you've seen a dotted event name anywhere that isn't in the table above, it isn't real — this catalog is exhaustive.
Payload
Every delivery is a small envelope wrapping the event-specific data:
{
"id": "evt_a1b2c3d4e5f6",
"type": "session.success",
"api_version": "2026-08-13",
"created": 1785751350,
"data": {
"token": "xtk_golden0001",
"status": "success",
"verified": true,
"verification_type": "full",
"ip_country": "DE",
"external_user_id": "cust-4711",
"checks": {
"liveness": { "performed": true, "passed": true },
"age": { "performed": true, "passed": true, "gate": 21 },
"document": { "performed": true, "passed": true, "document_type": "passport", "country": "DE" },
"face_match": { "performed": true, "passed": true },
"eu_wallet": { "performed": false, "passed": false },
"aml": { "performed": true, "passed": true },
"data_match": { "performed": true, "passed": true, "fields": { "last_name": "match", "date_of_birth": "match" } }
},
"risk": { "band": "low" },
"created_at": "2026-08-03T10:00:00Z",
"completed_at": "2026-08-03T10:02:30Z",
"expires_at": "2026-08-03T10:15:00Z"
}
}
For every session.* and review.* event, data is byte-identical to the tenant result your secret key gets back from GET /verify/v1/result/{token} — see Getting Started for the full field reference. api_version is the dated API version this payload's shape belongs to (see API versioning); created is a Unix timestamp in seconds. The special test event instead carries { "message": "..." }.
api_version is the dated API version this payload's shape belongs
to. It is the version pinned to the webhook endpoint, or to the website if the
endpoint has no pin of its own — never the version of whatever request happened to
finish the session. A redelivery replays the original bytes, in the version that
produced them. See API versioning.
Verifying the signature
Every request carries three headers:
X-Xident-Signature: t=1785751350,v1=5257a869e7bfa7e...
X-Xident-Event: session.success
X-Xident-Delivery: evt_a1b2c3d4e5f6
X-Xident-Signature—t={unix timestamp},v1={hex HMAC}X-Xident-Event— the event type, e.g.session.successX-Xident-Delivery— the event's unique id (also theidfield in the body). Use it as your idempotency key: retries reuse the same id, and consumers must deduplicate on it.
The signature is an HMAC-SHA256 of the timestamp and the raw request body (not a re-serialization of parsed JSON), keyed by your endpoint's whsec_… secret:
signed_payload = timestamp + "." + raw_request_body
expected = hex(HMAC-SHA256(webhook_secret, signed_payload))
if !constant_time_equal(expected, v1_from_header): reject
if abs(now - timestamp) > 300: reject // recommended tolerance
Compare digests in constant time. We recommend rejecting anything older than 300 seconds to limit replay of a captured payload.
Retries
A delivery is a success on any 2xx response; anything else (including a timeout) counts as a failure. Xident retries up to 5 times with backoff. An endpoint is automatically deactivated after 5 consecutive failures across any event type; a single successful delivery resets that counter back to zero.
Rate Limits
| Endpoint | Limit |
|---|---|
| Token verification | 100 req/min |
| SDK initialization | 1000 req/min |
| Wallet endpoints | 60 req/min |
| Webhook delivery | 5 retry attempts; endpoint auto-deactivates after 5 consecutive failures |
Next Steps
- Integration Guide - Detailed SDK usage
- Dashboard Guide - Managing your account
- API Reference - Full API documentation