Compatible Cases
About the service
Phone Verification UK 046 service verifies a provided phone number.
Product Code: W2_PHONEVERIFICATION_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:
Emai
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 Name | Type | Mandatory | Notes |
---|---|---|---|
Forename | String | - | Maximum 30 characters. |
Middlename | String | - | Maximum 30 characters. |
Surname | String | - | Maximum 30 characters. |
MobileNumber | String | - | The number must be in E.164 international format, without leading 00 or +, e.g. 447000000000. |
String | - | Must contain both "@" and ".". | |
SuccessRedirectUri | String | - | Customers will be redirected to this URL if their age verification succeeds. |
FailRedirectUri | String | - | 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
"w2PhoneAgeVerificationResult": {
"redirectUrl": "{{URL TO VERIME}}"
}
Immediate response breakdown
Property | Type | Notes |
---|---|---|
RedirectURL | string | URL 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_PHONEVERIFICATION_UK_046 Result for [CallReference] Dear [Company Name], This is the final result of a call to W2_PHONEVERIFICATION_UK_046 that you made at [Date Of Request] Order ID: [tid]. Client Reference: [your-client-reference] Call Reference: [CallReference] 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_PHONEVERIFICATION_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
{
"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 Name | Type | Possible Outcomes |
---|---|---|
Ref | String | Unique reference. |
Result | String | "True" or "False". This is the final outcome of the verification process. |
Tid | String | Transaction ID. |
Ts | Integer | The timestamp of the request. |
Sc | String | Security 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 Porta
- Password: Company API key
The resulting value is constructed as follows as described here :
- Username and password are combined into a string "username:password".
- 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.