onStatusChange (Response callback)

    privo.ageGate.onStatusChange(event => {}) 

The method is invoked by the Run/Recheck methods to handle status change results after Run/Recheck.

It returns:

interface AgeEvent {
  status: AgeCheckStatus;
  userIdentifier?: string;
  agId?: string;
  ageRange?: AgeRange;
}

interface AgeRange {
  start: number;
  end: number;
  jurisdiction?: string;
}

Example of real data:

{
    "status":"Allowed",
    "userIdentifier":"9ede0f0-...a78",
    "agId":"861dc238-...-c1dfe",
    "ageRange":{"start":18, "end":120, "jurisdiction": "coppa_us"}
}

Age Event parameters:

status - "Undefined", "Blocked", "MultiUserBlocked", "AgeEstimationBlock", "Allowed", "Сanceled", "Pending", "ConsentRequired", "ConsentApproved", " ConsentDenied, "AgeVerificationRequired", "AgeVerified", "AgeBlocked", "IdentityVerificationRequired", " IdentityVerified"

userIdentifier - optional field, external user identifier

agId - optional field, age gate identifier

Please check the Age Gate Status Description here