> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withverifa.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withverifa.com/_mcp/server.

# Age Verification

> Verify user age for age-gated products, services, and regulatory compliance.

Age verification is required across industries — alcohol and tobacco delivery,
online gambling, social media platforms, and age-restricted content. Verifa
extracts date of birth from government-issued IDs and calculates age
automatically, so you never have to trust self-reported ages.

## Why document-based age verification

Self-reported birthdates are trivially falsified. Credit-card checks only confirm
the cardholder is 18+, not the actual user. Document-based verification extracts
the date of birth directly from a government ID and pairs it with a selfie to
confirm the person presenting the document is the document holder.

## How it works with Verifa

1. **Create a session** — Your server creates a verification session via the API
2. **User completes capture** — Photographs their ID and takes a selfie
3. **Verifa extracts and checks** — OCR reads the date of birth, calculates age,
   and face match confirms the user matches the ID photo
4. **You get a clear result** — `age_check_passed: true/false` with the extracted age

## Quick implementation

### Create a session

#### cURL

```bash
curl -X POST https://api.withverifa.com/api/v1/sessions \
  -H "X-API-Key: vk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "external_ref": "user_abc123",
    "country": "US"
  }'
```

#### Python

```python
import requests

session = requests.post(
    "https://api.withverifa.com/api/v1/sessions",
    headers={"X-API-Key": "vk_live_your_key_here"},
    json={
        "external_ref": "user_abc123",
        "country": "US",
    },
).json()

# Redirect user to session["capture_url"]
```

#### JavaScript

```javascript
const session = await fetch('https://api.withverifa.com/api/v1/sessions', {
  method: 'POST',
  headers: {
    'X-API-Key': 'vk_live_your_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    external_ref: 'user_abc123',
    country: 'US',
  }),
}).then(r => r.json());

// Redirect user to session.capture_url
```

The minimum age threshold is configured in your **workflow**, not per-session.
When you add the Age Verification check to your workflow in the dashboard, you
set the `minimum_age` value there (e.g., 18, 21, 25). See the
[Creating a Workflow tutorial](/tutorials/creating-a-workflow) for how to
configure this.

### Check the result

```json
{
  "session_id": "session_abc123",
  "external_ref": "user_abc123",
  "status": "approved",
  "result": {
    "age_check_passed": true,
    "extracted_age": 28,
    "face_match_passed": true,
    "face_match_score": 0.94,
    "extracted_data": {
      "date_of_birth": "1997-06-15",
      "document_type": "drivers_license",
      "document_issuing_state": "CA"
    }
  },
  "processing_mode": "workflow",
  "created_at": "2026-01-15T12:05:00Z"
}
```

The `age_check_passed` field gives you a direct boolean — no date math required
on your end.

## Recommended workflow

For age verification, a minimal workflow is usually sufficient:

```
Capture → Document Scan → Face Match → Age Verification → Auto-Approve
```

Build this in the dashboard using the workflow builder, or use the "Age Gate"
template when creating a new workflow.

The following checks run automatically on every session — you don't need to add
them to your workflow:

* **Watchlist screening** — Screens against OFAC, EU, UN, and UK sanctions
* **Risk assessment** — Scores 150+ fraud signals to catch bots, virtual cameras,
  and other fraud attempts
* **Identity cross-reference** — Compares user-submitted data against
  OCR-extracted data (if you collect user info)

For stricter compliance (e.g., UK Online Safety Act, Australia Social Media Age
Act), consider adding these optional checks to your workflow:

* **Duplicate detection** — Prevent the same person from creating multiple accounts
* **Document expiration** — Reject expired IDs

## Embedding with verifa.js

For age-gated checkout flows, use a popup or modal so the user stays on your
page:

```html
<script src="https://app.withverifa.com/static/verifa.js"></script>
<script>
  document.getElementById('verify-age-btn').addEventListener('click', async () => {
    const res = await fetch('/api/create-age-verification', { method: 'POST' });
    const session = await res.json();

    Verifa.open({
      captureUrl: session.capture_url,
      sessionId: session.id,
      mode: 'modal',
      onComplete: (data) => {
        // Unlock age-gated content
        document.getElementById('checkout-btn').disabled = false;
      },
      onError: (err) => {
        console.error('Verification failed:', err);
      }
    });
  });
</script>
```

## Regulatory context

| Regulation                             | Jurisdiction              | Requirement                         |
| -------------------------------------- | ------------------------- | ----------------------------------- |
| UK Online Safety Act                   | United Kingdom            | Age assurance for harmful content   |
| Australia Social Media Minimum Age Act | Australia                 | Minimum age 16 for social media     |
| COPPA                                  | United States             | Parental consent under 13           |
| State age verification laws            | US (LA, TX, VA, UT, etc.) | Age verification for adult content  |
| Gambling Commission requirements       | United Kingdom            | ID verification for online gambling |

Verifa's document-based approach satisfies all of these — the extracted age
comes directly from a government ID, not self-attestation.

## Related

* [Tutorial: Creating a Workflow](/tutorials/creating-a-workflow) — Build a workflow with age verification step by step
* [Quickstart](/getting-started/quickstart) — Create your first session in 5 minutes
* [Verifications & Checks](/core-concepts/verifications-checks) — All available check types
* [Workflows](/core-concepts/workflows) — Customize the verification pipeline
* [JavaScript SDK](/integration-guides/java-script-sdk) — Embed verification in your frontend
* [Fraud Signals](/best-practices/fraud-signals) — 150+ signals to detect fake verifications