Run

for CDN version:

  privo.ageEstimation.run(data)

for NPM version:

  getInstance().run(data)
export interface CheckAgeData {
    userIdentifier?: string;
}

The user will be navigated to a corresponding entry window and forced to pass Age Estimation Flow.

CheckAgeData entry parameters:

userIdentifier - optional field, external user identifier

Result of invocation

    privo.ageEstimation.run(data)

will be provided in onStatusChange callback function.

privo.ageEstimation.onStatusChange should be set before privo.ageEstimation.run is invoked to get results. doc

Sample SDK Usage Example:

CDN:

privo.ageEstimation.init({
    env: "prod",
    serviceIdentifier,
});
privo.ageEstimation.onStatusChange((event) => {
   // ...
});
// ...
privo.ageEstimation.run({
    userIdentifier,
});

NPM:

const instance = await init({
    env: "prod",
    serviceIdentifier,
});
instance.onStatusChange((event) => {
   // ...
});
// ...
instance.run({
    userIdentifier,
});