Skip to content

Age verification

For the common case of verifying only the user’s age, use launchAgeInYearsVerification():

await session.launchAgeInYearsVerification('verification-container');

This flow requests age_in_years from the wallet (or birth_date for Google Pass IDs, which lack this field) but returns only the computed integer age — the raw birth date is never exposed to your application. The response contains a single age_in_years field under the org.iso.18013.5.1 namespace:

{
"status": "success",
"response": {
"org.iso.18013.5.1": {
"age_in_years": 34
}
},
"errors": {},
"warnings": {}
}

It accepts the same optional config parameter as launchMdlVerification():

await session.launchAgeInYearsVerification('verification-container', {
displayMode: 'embedded',
});