Business
How to implement two-tier age verification in your app or game
Add a selfie age estimation check at $0.10 per check, then send borderline or failed users to an ID document check inside the same workflow. One session API call starts the flow, and a full fallback ID check costs $0.33.

Contents
In this guide
Jump to the part you need.
This guide is for the developer or product owner adding an age gate to a game, a social app or a marketplace: a selfie age check first, a document check when the selfie is borderline or fails. Age Estimation costs $0.10 per check, and an ID document check costs $0.15 inside a workflow. The caveat comes first: a predicted age from a face is not legal proof of age, so plan the document fallback and the retention rules before launch.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Step | What it does | Price (USD) | Where the result lands |
|---|---|---|---|
| Selfie age check | Predicts age from one selfie and runs passive liveness in the same call | $0.10 per check | liveness_checks[].age_estimation |
| ID document check | Reads and authenticates a government document, extracts date of birth | $0.15 per check in a workflow, $0.20 through the standalone upload API | id_verifications[] |
| Face match 1:1 | Ties the selfie to the document portrait | $0.05 per check | face_matches[] |
| Full ID check (KYC) | ID document, passive liveness and face match, plus device and IP analysis, in one decision | $0.33 per check | Session decision |
| Sandbox | Build and test with a sandbox API key | Free on every plan, no credits consumed | The standalone Age Estimation API returns the documented static mock; test workflow sandbox behavior from its own documentation |
Start free in the sandbox at https://business.didit.me/ (no sales call). For developers, you can also connect Didit to an AI assistant through the Didit MCP server. The Age Estimation documentation covers the product, and every unit price is on the Didit pricing page.
What a two-tier age check actually is
Many consumer platforms use two levels of check. Age Estimation uses facial biometrics to estimate a person's age from a selfie. A full identity verification flow asks for a government ID plus biometrics. Features are gated behind those checks, and the exact mix is a product and legal decision, not a fixed recipe.
What you copy is the shape: a low-friction selfie estimate for everyone, a document check for the people who fall near the threshold or fail the estimate, and a configured retention period for the faces and documents you collect. That shape keeps cost per user low and keeps the strong evidence for the cases that need it.
Prerequisites
- A Didit organization. Sign up at business.didit.me. The Free plan includes $10 of credit a month for the first organization created with an eligible company-domain work email; phone codes are excluded. You can also register programmatically with
POST https://apx.didit.me/auth/v2/programmatic/register/followed byPOST https://apx.didit.me/auth/v2/programmatic/verify-email/. The response carries a sandbox API key and a live API key. - A workflow ID. The console ships an Adaptive Age Verification template (selfie age check with ID fallback), and you can build the same graph yourself.
- A backend that holds the API key. The
x-api-keyheader never belongs in client code; your server creates the session and hands the user a URL. - A return URL for the callback. When your application has allowed domains configured, an http or https callback must sit on one of those origins, otherwise session creation fails with a 400 on
callback. - Two numbers decided in advance: the age threshold you gate on (default 18) and how long you keep images. Which threshold your product and market require is a question for your counsel.
Step-by-step: implement age verification with Didit
- Map the gates and set the threshold. List the surfaces that need an age check: chat, spending, creator tools, sensitive content. Set the threshold on the Liveness node when you enable age estimation; the default is 18.
- Create the workflow. Open Workflows, choose Adaptive Age Verification, or start from the template and customise it. A workflow created through the API looks like the call below.
- Create a session and send the user into the flow. The response returns
session_id,urlandsession_token. - Read the decision. Fetch
GET https://verification.didit.me/v3/session/{session_id}/decision/and read the result underliveness_checks[].age_estimation. It is not a top levelage_estimations[]array. - Branch to the document step. If the predicted age lands within a band you choose around the threshold, or the estimate is declined, route the user to the ID document and face match steps. You can branch inside a node-based workflow, or run a second session with a document workflow. Borderline thresholds are product policy: choose the band for your product and validate it for each market with your counsel.
- Subscribe to the webhook. Register a destination for
status.updatedso you do not poll, and verifyX-Signature-V2(HMAC-SHA256 over the canonical JSON) with a timestamp freshness check of 300 seconds. - Test the standalone Age Estimation API in the sandbox, then switch the key. For that endpoint, a sandbox key returns a static Approved payload with
age_estimation: 30, no warnings, no stored session and no credits consumed. Other sandbox workflow behavior should be tested from its relevant documentation. Malformed input still returns 400, so you can test error paths.
Create the workflow. Age estimation is enabled on the Liveness node, and the decline threshold is set there too, defaulting to 18.
curl -X POST https://verification.didit.me/v3/workflows/ -H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" -d '{"workflow_label": "Age gate with ID fallback", "workflow_type": "kyc", "features": [{"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE", "age_estimation": true, "age_estimation_decline_threshold": 18}}, {"feature": "ID_VERIFICATION"}, {"feature": "FACE_MATCH"}]}'
Create the session. vendor_data is your own user ID and is strongly recommended, because it binds the session to the user and drives duplicate detection.
curl -X POST https://verification.didit.me/v3/session/ -H "x-api-key: $DIDIT_API_KEY" -H "Content-Type: application/json" -d '{"workflow_id": "$WORKFLOW_ID", "vendor_data": "player-42", "callback": "https://mygame.com/age/return"}'

If your backend already holds the selfie: the standalone call
Servers that capture the image themselves can skip the hosted flow and call the Age Estimation API directly. This is the runnable example from the Didit docs.
curl -X POST 'https://verification.didit.me/v3/age-estimation/' -H 'x-api-key: YOUR_API_KEY' -F 'user_image=@./selfie.jpg' -F 'age_estimation_decline_threshold=18' -F 'save_api_request=true' -F 'vendor_data=player-42'

Expected output
The standalone call returns one object per request. Values below are placeholders that show the shape.
{"request_id": "<request-id>", "age_estimation": {"status": "Approved", "method": "PASSIVE", "age_estimation": 17.4, "score": "<liveness-score>", "warnings": []}}
A session-based flow returns the same content under liveness_checks[] with features: ["AGE_ESTIMATION"]. The status enum is Not Started, In Progress, Approved, In Review, Declined, Abandoned or Kyc Expired. When save_api_request is true, the request_id is a real session ID you can pass to the decision endpoint.
Decision handling at a glance
| Decision | What it means | What to do |
|---|---|---|
| Approved | status is Approved only when warnings is empty. | Pass the age gate. If the predicted age sits close to your threshold, your product policy may still route the user to document verification. |
| Declined | One or more warnings, such as AGE_BELOW_MINIMUM, LOW_LIVENESS_SCORE, LIVENESS_FACE_ATTACK, AGE_NOT_DETECTED or NO_FACE_DETECTED. | Reject for an age below your minimum or a suspected presentation attack. For AGE_NOT_DETECTED or NO_FACE_DETECTED, ask for a guided retake. For a borderline age, follow your document fallback policy. |
| In Review | The session needs manual review. | Route it to your review queue and do not approve automatically. If a document forgery check produced no usable score, treat the document as unchecked. |
| Retake handling | Not a status. It is the response to image-quality warnings. | Ask for a new selfie with capture guidance. Do not offer unlimited retakes after a presentation attack. |
Inputs and outputs
| Field | Direction | Type or default | Notes |
|---|---|---|---|
user_image | Input, required | File | jpg, jpeg, png, tiff or webp, max 5 MB. PDFs are rejected. The largest face wins when several are present. |
age_estimation_decline_threshold | Input | Number, default 18 | A predicted age below it declines the check. |
face_liveness_score_decline_threshold | Input | Integer, default 30 | A liveness score at or below it adds LOW_LIVENESS_SCORE. |
save_api_request | Input | Boolean, default true | When true the call is stored as an API session, the face embedding joins your face index, and a status.updated webhook fires. |
vendor_data | Input | String | Your stable user identifier, echoed back and used for duplicate detection. |
rotate_image | Input | Boolean | Set it when captures may arrive sideways or upside down. |
age_estimation.status | Output | Enum | Approved only when warnings is empty. |
age_estimation.age_estimation | Output | Number, years | Null when no age could be extracted. |
age_estimation.score | Output | 0 to 100 | Passive liveness score, not an age confidence. |
warnings[] | Output | Array of codes | AGE_BELOW_MINIMUM, AGE_NOT_DETECTED, LOW_LIVENESS_SCORE, NO_FACE_DETECTED, LIVENESS_FACE_ATTACK, MULTIPLE_FACES_DETECTED. |
Failure cases and recovery
- HTTP 400, missing or oversized image, unsupported extension. Validate the file before it leaves your client: 5 MB ceiling, no PDF. Ask for a retake rather than retrying the same bytes.
- HTTP 403, not enough credits. The call stops before any processing and returns a not-enough-credits error. Top up or move the workload to a plan with more monthly credit.
- HTTP 403 on authentication. This API never returns 401: a missing or invalid key answers 403 with a permission message. Check the key and the environment.
- HTTP 429. The shared write budget is 300 requests a minute per API key across all POST, PATCH and DELETE endpoints.
- Declined with
AGE_BELOW_MINIMUM. The predicted age sits below your threshold. Reject, or route to a document check if your policy allows a second signal. - Declined with
LOW_LIVENESS_SCOREorLIVENESS_FACE_ATTACK. A presentation attack is suspected. Reject and log it; do not offer an unlimited retake loop. AGE_NOT_DETECTEDorNO_FACE_DETECTED. Usually image quality, framing or lighting. Request a retake with capture guidance.- Status
In Reviewon the document step. Route to your manual review queue and do not approve. If a document forgery check produced no usable score, treat the document as unchecked. Abandoned. The user left the flow. Handle expired sessions separately withKyc Expiredand configuresession_expiration_time.Kyc Expired. The session link expired. Setsession_expiration_timebetween 3600 and 2419200 seconds when you create the session.- Webhook not received. A handler slower than 5 seconds, or one answering 5xx or 404, gets two retries about 1 and 4 minutes later, then the delivery is dropped. Resend it from the destination's delivery log and de-duplicate on
event_id. - Threshold tuned against the sandbox. The standalone Age Estimation API sandbox answers Approved with an age of 30. Never calibrate a production band on mock values. Test workflow sandbox behavior from its relevant documentation.
Paid steps and review boundaries
You pay per completed check from prepaid credit. Age Estimation is $0.10. ID verification is $0.15 inside a workflow and $0.20 through the standalone upload API. Face match is $0.05, and a full ID check is $0.33. The Workflow Orchestrator, the SDKs, reusable KYC and the MCP server are free and included. For the standalone Age Estimation API, each 200 response consumes one credit, including a Declined decision. A 403 for insufficient credits stops before processing. Phone codes are excluded from Free plan credit, and the sandbox never charges.
What Didit hands back is a decision with warnings. What your product does with it is yours: which features stay closed, how long a user waits, whether a borderline case goes to a person. Manual review of In Review sessions belongs in your queue. Whether a selfie estimate satisfies a specific law in a specific market is a legal question, and so are the age thresholds themselves.
Worked cost example
Take 40,000 new users a month, an 18 threshold, and 12% of selfie checks landing in the document fallback band or failing.
- Selfie age checks: 40,000 x $0.10 = $4,000.00
- Users in the fallback: 40,000 x 0.12 = 4,800
- Fallback full ID checks: 4,800 x $0.33 = $1,584.00
- Monthly total: $4,000.00 + $1,584.00 = $5,584.00
- Blended cost per signup: $5,584.00 / 40,000 = $0.1396
- A fallback user costs $0.10 + $0.33 = $0.43 across both steps
On the Scale plan, Didit prices carry a 10% discount: $0.09 per age check and $0.297 per full ID check. That gives 40,000 x $0.09 = $3,600.00 plus 4,800 x $0.297 = $1,425.60, a total of $5,025.60. The $299 monthly plan fee is charged separately and comes with $350 of monthly credit that offsets part of the usage. On the Free plan, $10 of monthly credit covers 100 age checks at $0.10 each for an eligible organization.

Alternatives to a vendor age check
The short answer on alternatives is that you have four routes, and three of them shift the cost rather than removing it.
- Use a store or platform age signal, if one is available to you. Treat it as one input, not as proof: what it covers and whether it is shared with your app depends on the platform and the market, so check the current terms yourself. Expect a share of users who do not share it.
- Self-declaration. A date of birth field is cheap and weak. Some laws rule it out entirely for the features you are gating.
- Build it in house. Training and maintaining an age model, plus document forensics, plus liveness, is a multi-quarter engineering commitment with an ongoing fraud cost.
- Use a specialist vendor. This page describes Didit because it is our product. No vendor cards were supplied for this article, so this page does not rank other vendors or state competitor details.
A common pattern for apps distributed through a store is to use the store signal where it exists, a selfie estimate for the rest, and a document check at last. That is the two-tier shape the steps above build.
Sources
- Didit pricing page and the pricing docs, read November 26, 2026.
- Age Estimation overview, read November 26, 2026.
- Age Estimation API reference, read November 26, 2026.
- ID Verification overview, read November 26, 2026.
- Quick Start, read November 26, 2026.
- Create Session API, read November 26, 2026.
- Webhooks and HMAC signing, read November 26, 2026.
- Didit MCP server, read November 26, 2026.
- Didit Business Console, read November 26, 2026.
- This article cites no third-party vendor pages. No vendor cards were available to verify competitor details, so no competitor facts appear here.
Start free: create an organization at https://business.didit.me/, build the Adaptive Age Verification workflow, and run the flow in the sandbox before you spend a credit. No sales call is needed.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
How do I implement a selfie-first age gate with a document fallback?
Create a Didit workflow that runs passive liveness with age estimation, add ID verification and face match as the fallback step, then create a session with POST /v3/session/ and send the user to the returned URL. Read the result from liveness_checks[].age_estimation and gate features on the decision. The Adaptive Age Verification template does the selfie check with ID fallback without any graph work.
How much does an age check cost per user?
Age Estimation is $0.10 per completed check and includes passive liveness. An ID document check is $0.15 inside a workflow and $0.20 through the standalone upload API. A full ID check with document, biometrics and device analysis is $0.33. A blended build with 12% document fallback costs about $0.14 per signup in the worked example.
How should I choose the threshold band for document fallback?
Treat the threshold band as product policy, not a model setting. Choose how far around your age threshold a predicted age should go to document verification, then validate that policy for each market with your counsel. The model's error grows close to the threshold, which is why borderline results deserve a fallback. Do not calibrate the band on sandbox mock values.
What does a two-tier age verification flow need to do?
It needs a selfie estimate with passive liveness for the low-friction path, a document check with portrait matching for the fallback, a configurable threshold, a decision your backend can trust, and controls for how long face and document data is retained. Those pieces are available as separate Didit modules inside one workflow. The exact gates and retention rules remain your product and legal decisions.
Does Age Estimation include passive liveness, and what does the score mean?
Yes. Age Estimation includes passive liveness in the same call, and the response carries a score from 0 to 100. That score is the passive liveness score, not an age confidence. A score at or below the configured face_liveness_score_decline_threshold, default 30, adds LOW_LIVENESS_SCORE.
Is facial age estimation legal proof of age?
No. The age is predicted from the face, not verified against a document, and the docs say to use it for age gates and low-friction checks rather than as legal proof. That is why borderline results deserve a fallback to document-based verification. Which evidence your market accepts is a question for your counsel.
How accurate is age estimation at 16 to 18?
The model's mean absolute error is 1.1 years for 16 and 17-year-olds and 1.9 years for 18 to 20-year-olds. It correctly classifies 96% of selfies as under 18 or 18 and over. Error grows close to your threshold, which is the reason for a document fallback band.
What happens when a selfie check fails or a user is borderline?
The call returns status Declined with a warning code such as AGE_BELOW_MINIMUM, LOW_LIVENESS_SCORE or AGE_NOT_DETECTED, and any warning means the status is not Approved. Route borderline ages to the document step and image-quality failures to a guided retake. Presentation attacks should be rejected, not retried.
Can I test age verification without paying?
Yes, for the standalone Age Estimation API. A sandbox API key skips processing and billing: after request validation the endpoint returns a static Approved payload with an age of 30 and no warnings, and no session is stored. Malformed input still returns 400, so you can test error paths. Test workflow sandbox behavior from its relevant documentation, and never tune a production threshold on mock values.
Where does the age result appear in the API response?
In the standalone call it sits under age_estimation with status, method, the predicted age, a liveness score and warnings. In a session-based flow the same content appears in liveness_checks[] on each Liveness entry, not in a top-level age array. Fetch it with GET /v3/session/{session_id}/decision/.
Do I need consent to process a user's face?
In some places, yes. In Auto consent mode, a session created with an Illinois, Texas or Colorado user_state asks for explicit biometric consent before the first face capture. If you already collected consent, pass biometric_consent with given_at and a text_version and the flow will not ask again. Your counsel decides what your markets require.
How fast does the check run for a user?
Didit targets sub-2-second p99 inference, so the selfie step resolves while the user is still on the screen. Neither step needs a manual reviewer unless the decision comes back In Review.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


