DOM EventsEvent structures
Widget.AgeGate.Result
Emitted when the Age Gate flow completes with a result. A session is created when the flow completes successfully, and a challenge is created whenever the flow needs one, either for Verifiable Parental Consent or for product-level age assurance when the user claims an age at or above the trigger age.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
eventType | string | yes | Always "Widget.AgeGate.Result" |
data | object | yes | Result details |
data.status | string | yes | Result status. One of "PASS", "FAIL", or "PROHIBITED" (see Status values). |
data.sessionId | string (UUID) | no | Session ID when the flow completes successfully. Always present when status is "PASS", absent otherwise. |
data.challengeId | string (UUID) | no | Challenge ID when a challenge was involved in the flow (for example, parental consent or product-level age assurance). Only present when a challenge was created. |
data.age | number | no | The age the user entered at the age gate. Present when status is "PROHIBITED". |
Status values
status | Meaning | What to do |
|---|---|---|
PASS | The user cleared the age gate and a session was created. sessionId is present. | Grant access using the returned sessionId. |
FAIL | A challenge the flow required didn't pass, for example a trusted adult denied parental consent or the user didn't pass product-level age assurance. No session is created. challengeId identifies the challenge. | Don't grant access. |
PROHIBITED | The user is below the minimum age for the product in this jurisdiction and can't proceed. No session is created. age carries the entered age. | Block the user from continuing. |
Confirm results server-side
Treat the event status as a UX hint. Confirm the outcome server-side via the Challenge.StateChange webhook or /session/get before granting access.
Examples
When a challenge was resolved during the flow
{
"eventType": "Widget.AgeGate.Result",
"data": {
"status": "PASS",
"sessionId": "f1af4704-74b4-4966-b13a-18eb16bccf9c",
"challengeId": "a04467a0-83de-40ca-8572-8cc761e896aa"
}
}When no challenge was required
{
"eventType": "Widget.AgeGate.Result",
"data": {
"status": "PASS",
"sessionId": "f1af4704-74b4-4966-b13a-18eb16bccf9c"
}
}When the user is below the minimum age
No session is created. Block the user from continuing.
{
"eventType": "Widget.AgeGate.Result",
"data": {
"status": "PROHIBITED",
"age": 8
}
}