Skip to content
On this page

W2 Data Phone Age Verification UK 046

Compatible Cases

About the service

Phone Age Verification UK 046 service verifies the age of a customer.

Product Code: W2_PHONEAGEVERIFICATION_UK_046

Does this service leave a credit search Footprint? No

Callback Preference

The details of how this response should be communicated need to be agreed with W2 during the onboarding process. The current options are:

  • Email
  • HTTP POST request to a specified endpoint (Formatted in XML or Json)

This preference must be agreed with W2 during the on-boarding process in order to use the service.

Request

The following properties pertain to this service.

Property NameTypeMandatoryNotes
ForenameString-<= 30 characters.
MiddlenameString-<= 30 characters.
SurnameString-<= 30 characters.
MobileNumberString-The number must be in E.164 international format, without leading 00 or +, e.g. 447000000000.
EmailString-Must contain both “@” and “.”.
SuccessRedirectUriString-Customers will be redirected to this URL if their age verification succeeds.
FailRedirectUriString-Customers will be redirected to this URL if their age verification fails.

Response

Immediate Response

The service will then immediately send back a W2AgeVerificationResult result, which is part of the ServiceResult object of the response.

Example Response:

json
"w2PhoneAgeVerificationResult": {
    "redirectUrl": "{{URL TO VERIME}}"
}

Immediate response breakdown

Description of the response:

Property NameTypeNotes
RedirectUrlStringURL to the age verification service. Customers are to navigate to this URL to complete the age verification process.

Final Response

After a user has completed the age verification process, W2 will send a second response to the initial query, containing the final result. This result will be sent either by email or HTTP POST as request. The recipient email address / URL endpoint will have been agreed upon during the on-boarding process.

Email Response
If email was requested, an email will be sent out containing the Call ID of the initial request and the link to the result. It will look something like this:

Result Email
Subject: W2_AGE_VERIFICATION Result for [CallReference]
Dear [Company Name],
This is the final result of a call to W2_Age_Verification that you made at [Date Of Request]
Order ID: [CallReference].
Client Reference: [your-client-reference]
To view the results, please click on this link: [Link to our portal with the result]
Kind regards
W2 Global Data

POST Response

If a POST response was requested, a HTTP post request will be sent out containing a populated TransactionInformation object serialized into XML or Json.

The TransactionInformation object will be identical in structure to the one returned in the immediate response. However it will only contain a single ServiceTransaction which will be the final result of the W2_PHONEAGEVERIFICATION_UK_046 call.

The end result is that the resulting HTTP POST request will look something like this:

Result POST request
POST [Callback URL] HTTP/1.1
Content-Type: application/xml or application/json
Authorization: Basic [Network credential built from company name and API key - see note 1]
Host: [Callback URL host]
Content-Length: [Length of message]
Expect: 100-continue
[XML of TransactionInformation object]

Example POST request / response

json
{
  "WebServiceCallHistoryRef": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "ServiceTransactionInformation": {
    "Service": 90,
    "ServiceTransactionResult": 200,
    "ServiceTransactionResultMessage": "",
    "ValidationResult": "NotApplicable",
    "HaltTriggered": false,
    "ServiceInterpretResult": "NotApplicable",
    "ServiceHasFailedOver": false
  },
  "Result": {
    "Ref": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "Result": "true",
    "Tid": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
    "Ts": 1683802025,
    "Sc": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Breakdown of the Result section

Property NameTypePossible Outcomes
RefStringUnique reference.
ResultString"True" or "False". This is the final outcome of the verification process.
TidStringTransaction ID.
TsIntegerThe timestamp of the request.
ScStringSecurity key.

Note 1: An authorization header is added to give customers the option to authenticate the request before accepting it. The credential is a network credential made up from the following:

  • Username: Name of company as it appears in Portal
  • Password: Company API key

The resulting value is constructed as follows (as described here):

  1. Username and password are combined into a string "username:password".
  2. The resulting string is then encoded using the RFC2045-MIME variant of Base64, except not limited to 76 char/line.

This will create something like:

Example Authorization Header
Basic VzI6cGl6emE=

Allowing the endpoint server to deny the request based on this credential if that is preferred.

Sandbox

If the Sandbox query option is set to "true" then any of the following entities will return a result:

Sandbox cases

These are the sandbox options for these service. Learn about our Sandbox here

Click on a sandbox case to view the request and response