Run
privo.ageVerification.run(profile, onChange)
The method runs the Age Verification.
The Run method entry parameters:
profile — optional field, user profile passed from a partner (AgeVerificationProfile, see below)
onChange — callback that fires when the verification status is changed. It initiates AgeVerificationEvent.
AgeVerificationProfile
export interface AgeVerificationProfile {
userIdentifier?: string;
firstName?: string;
email?: string;
birthDateYYYYMMDD?: string; // "yyyy-MM-dd" format
birthDateYYYYMM?: string; // "yyyy-MM" format
birthDateYYYY?: string; // "yyyy" format
age?: number;
countryCode?: string;
phoneNumber?: string; // E.164 format, e.g. "+17024181234"
}
AgeVerificationProfile fields:
userIdentifier — optional field, external user identifier
firstName — optional field, external user first name
email — optional field, external user email address
birthDateYYYYMMDD — optional field, external user birth date in “yyyy-MM-dd” format
birthDateYYYYMM — optional field, external user birth date in “yyyy-MM” format
birthDateYYYY — optional field, external user birth date in “yyyy” format. Derived birthDate will be calculated with Dec 31 by default
age — optional field, external user age. Derived birthDate will be calculated with current day and month by default
countryCode — optional field, two-letter country code (ISO 3166-1 alpha-2 Wiki)
phoneNumber — optional field, external user phone number in the full international format (E.164, e.g. “+17024181234”)
The Run method response:
export interface AgeVerificationEvent {
status: AgeVerificationStatus;
profile?: AgeVerificationProfile; }
The new entry window has two display modes: Redirect and Popup (according to configuration in the
privo.ageVerification.init method).
Redirect mode - implies sending users to a different URL from the one they originally
requested.
Popup mode - implies displaying via a popup browser window that is displayed on top of the existing windows on
the screen.
Please check the Age Verification Status Description table