Age Estimation

This solution estimates end-user's age from the selfie images that they capture. You receive the end-user's estimated age and estimated gender.

It is available via API, web flow, and native SDKs.

A separate integration is needed to do this verification, please contact your solutions engineer for info and configuration.

Prerequisites

  • You have an integration set up with Veriff by your Solutions Engineer

  • You have configured the decision webhook to get responses from Veriff (see the Webhooks section for info)


Flow overview

The flow is a bit different, depending on the method you are using to verify your end-users with Veriff.

Use via SDKs

  1. Create a new session using the API keys and the baseURL of your Age Estimation integration (see the API Documentation and reference[↗] about how to find these)

    1. We recommend creating and using a vendorData parameter to pass a unique identifier for the end-user in the flow

  2. Direct the end-user into the verification flow

  3. The end-user passes through the verification flow on their device, where they are required to capture only a selfie (no ID document is needed)

  4. Session will be automatically set to submitted as soon as the end-user has submitted their images

  5. Receive the results from Veriff via decision webhook, query them using the GET sessions/{sessionId}/decision[↗] endpoint, or view them in the Veriff Customer Portal

Use via API

In this case you need to collect the end-user’s selfie image(s) yourself and pass them to Veriff.

  1. Create a new session using the API keys and the baseURL of your Age Estimation integration (see the API Documentation and reference[↗] about how to find these)

    1. We recommend creating and using a vendorData parameter to pass a unique identifier for the end-user in the flow

  2. Upload the end user’s selfie via POST /sessions/{sessionId}/media[↗] endpoint with image.context as face (see Context types (image, video) for more info about image context types)

  3. Patch the session to submitted using the PATCH /sessions/{sessionId}[↗]

  4. Receive the results from Veriff via decision webhook, query them using the GET sessions/{sessionId}/decision[↗] endpoint, or view them in the Veriff Customer portal


Find decision and/or session related info

You can get the data from three sources:

  • Receive the decision webhook

  • Query the results via GET sessions/{sessionId}/decision

  • View the session in Veriff Customer Portal

Webhook and API call payload

In the webhook and the GET sessions/{sessionId}/decision endpoint, the data is in:

  • verification.additionalVerifiedData.estimatedAge as a number of the estimated exact age

  • verification.additionalVerifiedData.estimatedGender as a number of the estimated* gender

*Values closer to 0.0 indicate that the end-user is likely to be male, values closer to 1.0 indicate that the end-user is likely to be female.

Note that the payload example below contains only the Age Estimation-related part. See the decision webhook and GET sessions/{sessionId}/decision[↗] documentation for the full payloads.

Sample payload

{
    "status": "success",
    "verification": {
        "id": "12df6045-3846-3e45-946a-14fa6136d78b",
        "attemptId": "6cab5b0-c506-47a6-922d-6ae3b72ca172",
        "vendorData": "12345678",
        "endUserId": "a1b2c35d-e8f7-6d5e-3cd2-a1b2c35db3d4",
        "status": "approved",
        "code": 9001,
        "reason": null,
        "reasonCode": null,
        "decisionTime": "2019-11-06T07:18:36.916Z",
        "acceptanceTime": "2019-11-06T07:15:27.000Z",
        ...
        "additionalVerifiedData": {
            "estimatedAge": 32,
            "estimatedGender": 0.613,
        },
        "comments": []
    },
    ...
    "technicalData": {
        "ip": "186.153.67.122"
    }
  }

Veriff Customer Portal

You can find the verification session related info, including the decision, in the Veriff Customer Portal, under the Webhooks tab.

See Review verification in Veriff Customer Portal about how to view the session info in the Veriff Customer portal


Session status and session decision info

Check the verification.status and verification.code strings in the decision webhook payload. They can be the following:

verification.status

verification.code

What does it mean?

approved

9001

Positive: end-user was verified. The verification process is complete.


Accessing the sessionURL again will show that nothing is to be done here.

declined

9102

Negative: end-user has not been verified. The verification process is complete.


Either it was a fraud case or some other severe reason that the end-user could not be verified. You should investigate the session further and read the Granular reason codes (table).


If you decide to give the end-user another try, you need to create a new session (see the POST /sessions for more info).

resubmission_requested

9103

Resubmission has been requested. The verification process has not been completed.


Something was missing from the end-user, and they need to go through the flow once more. The same sessionURL should be used for this purpose.


You can investigate the session further and read the Granular reason codes (table).

If the session was declined or resubmission_requested, you can find additional information by checking the verification.status, verification.code, verification.reason and verification.reasonCode data objects.

For more info about the codes you are seeing, refer to: