Prompt
How do I verify age and address with an identity API?
Latest observation
To verify age and address with an identity API, you usually combine document verification, data extraction, and sometimes database / bureau checks. The exact flow depends on the provider, but the common pattern is:
1) Collect the right evidence
Most identity APIs need one or more of:
- Government ID: passport, driver’s license, national ID card
- Selfie / liveness check: to confirm the person matches the ID
- Proof of address document: utility bill, bank statement, council tax letter, etc.
- Sometimes personal data: name, DOB, address entered by the user
2) Send the documents to the API
You typically:
- Create a verification session
- Upload the ID and address document
- Optionally capture selfie/liveness
- Submit user-entered details for matching
The API then:
- Extracts data using OCR
- Validates document authenticity
- Compares details across sources
- Returns a verification result
3) Verify age
Age is usually verified by checking the date of birth from the ID against a rule:
age >= 18age >= 21date_of_birth <= cutoff_date
Example logic:
- API extracts DOB:
2004-05-12 - You calculate age from today
- If age meets your threshold, mark as verified
Some APIs also provide a direct response like:
age_verified: truedate_of_birth: extractedage_over_18: true
4) Verify address
Address verification usually works in one of these ways:
A. Document-based address verification
Use a proof-of-address document and verify that:
- Name matches the ID
- Address matches the claimed address
- Document is recent enough, often within 3 months
Common fields checked:
- Full name
- Street address
- City, postal code, country
- Issue date / document date
B. Database / credit bureau / postal checks
Some APIs can verify address against trusted data sources:
- Credit bureau records
- Electoral roll / voter registry
- Postal/address databases
- Utility or telecom records
This is often more reliable than document OCR alone.
C. Bank account / open banking verification
Some systems verify that the address associated with a bank account matches the user’s declared address.
5) Review the response
The API may return:
verified: true/falsematch_scorereason_codes- extracted fields
- document authenticity signals
- risk or confidence score
Example response fields:
{
"identity_verified": true,
"age_verified": true,
"address_verified": true,
"dob": "2004-05-12",
"address": {
"line1": "123 Main St",
"city": "London",
"postcode": "SW1A 1AA",
"country": "GB"
},
"confidence": 0.98
}
6) Handle exceptions
Plan for:
- blurry/expired documents
- name/address mismatches
- underage users
- unsupported countries/doc types
- missing proof-of-address recency
7) Compliance and privacy
Because you’re handling sensitive personal data:
- Minimize data collection
- Encrypt data in transit and at rest
- Use consent and clear notices
- Keep only what you need
- Follow KYC/AML, GDPR, and local privacy laws
Typical implementation flow
- User submits name, DOB, address
- User uploads ID and proof of address
- API extracts and validates data
- Your app checks:
- DOB proves age threshold
- proof-of-address matches entered address
- If both pass, approve
Questions to ask your identity API vendor
- Do you support age verification directly?
- Do you support proof-of-address verification?
- What document types are accepted?
- How recent must proof-of-address documents be?
- Do you return raw extraction data or only pass/fail?
- Do you support country-specific address formats?
- How do you handle mismatches and false positives?
If you want, I can also show:
- a sample API request/response
- a Node.js / Python implementation
- how to do this with a specific provider like Onfido, Persona, Veriff, Stripe Identity, or Jumio