Ages 13 to 19

This account’s check is a closed band. Minimum 13, maximum 19. The button opens a TrustElevate camera check. TrustElevate estimates age and calls onCallback with the band decision.

What your app should do

No result yet. Choose the flags, then start the check. TrustElevate opens the camera and onCallback receives one receipt.

Receipt

No callback yet

Thresholds

Two sets of numbers apply. You set the age band on the component. TrustElevate sets the camera lines when it opens the check. The holder never types an age or a date of birth.

Age band

This demo is a closed band. The estimate must be greater than or equal to 13 and less than or equal to 19. The comparison uses the raw estimate. TrustElevate does not round it to a whole year.

PropThis demoRule
minAge13Inclusive lower line. 13 is inside. 12.99 is outside.
maxAge19Inclusive upper line. 19 is inside. 19.01 is outside.
ageBand13-19Name stored on the session and returned on the receipt. Open the experience only when eligible is true and ageBand is 13-19.

A missing estimate is not an outside-band result. The page keeps waiting until the camera returns a number. eligible: false with a number means the estimate fell outside 13 to 19.

Camera lines

The package does not send these. TrustElevate sends them with the camera session. They do not replace your band. The pass or fail on this page is still the facial estimate against 13 and 19.

LineValueWhat it does
Age line100The camera’s own age line is 100, so it returns an estimate instead of deciding 13 to 19. TrustElevate applies your band after the estimate arrives.
Face match0.2Minimum face-match score when a document is part of a session. This demo asks for a face only, so the receipt does not depend on a document match.
Face compare0.25Runs only when the Face compare flag is on. The compare score must be at least 0.25. Off, the score is ignored.
Document age0.01Runs only when the Document age flag is on. The camera reads an identity document, and that age must sit inside 13 to 19 and within the facial gap. Off, no document is requested.

Liveness is on. The frame has to see a live face. Both extra checks are off until you tick the flag above the button. With Document age on, the facial estimate may sit at most 35% away from the document age at ages 10 to 14, and 30% away at ages 15 to 19.

Results

The sentence above the receipt is what your app should do with this result. The receipt is the onCallback payload. Read it in this order.

What you seeWhat it meansWhat to do
eligible: true and ageBand: "13-19"The facial estimate is inside 13 to 19. If Face compare was on, the score is at least 0.25. If Document age was on, the document age is inside the band and within the facial gap.Open the experience.
eligible: false and a facial estimate under 13 or over 19The estimate is outside the band. 13 and 19 are inside. 12.99 and 19.01 are outside. The raw number is not rounded.Leave the experience closed. Do not ask for a date of birth.
Message contains “face compare did not pass”Face compare was on and the score is under 0.25. The facial estimate is not used as a pass.Leave the experience closed.
Message contains “Unable to resolve document age”Document age was on and the camera did not return a document age.Leave the experience closed, or run the check again with the document in frame.
Message contains “too far apart”Document age was on. The facial estimate is further from the document age than 35% at ages 10 to 14, or 30% at ages 15 to 19.Leave the experience closed.
eligible: false and a document age outside 13 to 19Document age was on. The document age itself is outside the band, even if the face estimate is inside.Leave the experience closed.
Message contains “Unable to resolve age” and no estimateThe camera has not returned a number. That is not an outside-band result.Keep the frame open until a number arrives.
Status 429The monthly holder-age quota is spent. quota has the period, used count, and remaining count.Leave the experience closed. This is an account result.
Status 401 or 403The client secret or the account was refused.Leave the experience closed. This is an account result.
“Age verification did not open.”The session did not return a camera frame.Leave the experience closed and start the check again.

Face compare off means a low compare score cannot fail the check. Document age off means a missing document cannot fail the check. The flags above the button are the ones sent with the next check.

Install

Download trustelevate-age-1.0.0.tgz

npm install ./trustelevate-age-1.0.0.tgz

Put the sandbox secret on the server, then mount one route.

TE_CUSTOMER_ID=your-customer-id
TE_CLIENT_SECRET=your-sandbox-secret
TE_API_BASE=https://api.trustelevate.com
import { ageHandler } from "trustelevate-age/server";

const age = ageHandler();
// POST /api/trustelevate/age → age(req, res)

Usage

import { AgeVerification } from "trustelevate-age";

<AgeVerification
  customerId="your-customer-id"
  apiBase="https://api.trustelevate.com"
  endpoint="/api/trustelevate/age"
  minAge={13}
  maxAge={19}
  ageBand="13-19"
  faceCompare={false}
  documentAge={false}
  subject="teen-account"
  callbackUrl="https://client.example/age-receipt"
  onCallback={(receipt) => {
    if (receipt.status === 429) return showQuota(receipt.quota);
    if (receipt.status && receipt.status >= 400) return showBlocked(receipt.message);
    if (receipt.eligible && receipt.ageBand === "13-19") return openExperience();
    showOutsideBand();
  }}
/>

Best practice