developer documentation

Starting a Verification

The verification process is asynchronous, where you start the verification, the user completes it at their own pace, and you receive a callback to your redirect_url when they’re finished.

Key Characteristics

  • Asynchronous: You don’t wait synchronously for results
  • Callback-based: Receive a callback when they’re finished
  • Simple integration with two endpoints: Start a verification, then check the verification status when you receive a callback

The verification process consists of 4 steps:

  1. Initiate Verification
  2. Handle Immediate Response
  3. User Completes Verification
  4. Handle the Final Result

Step 1: Initiate Verification

Your system makes a single API call:

				
					POST /api/v3/verifications
Authorization: hmac {your_api_key}:{signature}
Content-Type: application/json
{
"redirect_url": "https://yoursite.com/verification-complete",
"country": "gb",
"external_user_id": "user-12345"
}
				
			

Request Body Parameters

Parameter Required Description
redirect_url

Yes

URL that the user will be redirected to after verification

country

Yes

2-letter ISO country code: au (Australia), br (Brazil), gb (United Kingdom), de (Germany), fr (France), us (United States), es (Spain), ie (Ireland), kr (South Korea), it (Italy).

CPF background check only available in Brazil (br).

business_settings_id

No

ID containing your account configuration including the verification methods which will be made available to your users

user_info

No

Contains the user's encrypted email address, mobile number and/or CPF, plus an optional date of birth and/or name, if you wish to perform a background age check. See User Info Parameter.

method

No

Directs the user to try to verify using this method first

external_user_id

No

Your system's UUID to identify the user

webhook

No

URL to receive verification event notifications. When set, your server is notified in addition to the standard redirect flow. See Notifications Webhook for payload details.

webhook_notification_level

No

Granularity of webhook notifications: minimal (default), method-exhausted, detailed. Only applies when webhook is set.

💡 Variable parameters in your callback URLs

You can use query strings while starting the verification.

Example:
Allowed Redirect URL: https://your-website.com/redirect-1

What you send to the verification endpoint: https://your-website.com/redirect-1?my-custom-parameter=custom-value

The redirect URL is still valid, and you’ll receive the parameter intact in your callback

Business Settings ID

The business_settings_id provides you with a set configuration and controls the verification methods available to your users, the number of verification attempts for each method, language options, and account creation and sign-in settings with Verifymy.

Without this parameter, users will see a default journey with options determined solely by the country parameter.

Example Request with Specific Business Settings ID

				
					POST /api/v3/verifications
Content-Type: application/json
Authorization: hmac {api_key}:{hmac_signature}

{
    "redirect_url": "https://your-website.com/callback",
    "country": "gb",
    "business_settings_id": "5369a307-7b19-4890-a41d-6923c15549d6",
}
				
			

⚠️ CAUTION

The configuration differs between production and sandbox environments. You will need separate business setting ids for each environment.

User Info Parameter

Here you can utilise user data collected during the account creation process or other interactions on your site to perform a background age check.

When using the user_info parameter, you must provide at least one of: the user’s email address, mobile number or CPF (Brazil only). You can send more than one in the same request. The background checks run in the order configured in your business settings, and the first one that verifies the user ends the check.

Email Format Specification

The email address must follow the RFC 3696 convention, and:

  • Must be less than 254 characters.

 

📌 Example: support@verifymy.io

Mobile Number Format Specification

An E.164 number:

  • Can have a maximum of 15 digits.

Must include:

  • A leading “+” sign.
  • The country code (e.g., 44 for the UK)
  • No spaces, parentheses, or dashes.

     

📌 Example: +447911123456

CPF Format Specification

The CPF (Cadastro de Pessoas Físicas) as an 11-digit number, digits only, without dots or dashes.

We validate the format and the check digits before any lookup. 

📌 Example: 12345678909

Date of Birth Format Specification (Optional)

ISO 8601 calendar date: YYYY-MM-DD.

Only used together with the CPF, as a consistency check against the date of birth registered for that CPF.

It is never used to calculate the user’s age.

Whether a matching date of birth is required is configured in your business settings (contact your onboarding manager).

📌 Example: 1990-04-23

⚠️ CAUTION

The background age check using mobile number is only available in the UK 🇬🇧

User Info Encryption

The SDK automatically encrypts email when present. Other fields (phone, cpf and dob) are not encrypted by the SDK: encrypt them yourself using the same scheme (AES-256-CFB, key = first 32 bytes of the raw SHA-256 of your API secret, output = base64(iv . ciphertext)).

				
					function encryptUserInfoField(string $value, string $apiSecret): string
{
    $key        = substr(hash('sha256', $apiSecret, true), 0, 32);
    $iv         = openssl_random_pseudo_bytes(16);
    $ciphertext = openssl_encrypt($value, 'AES-256-CFB', $key, OPENSSL_RAW_DATA, $iv);
    return base64_encode($iv . $ciphertext);
}

$userInfo = [
    'email' => 'user@example.com',                                // encrypted automatically
    'phone' => encryptUserInfoField('+447123456789', $apiSecret), // encrypt it yourself
    'cpf'   => encryptUserInfoField('12345678909', $apiSecret), // encrypt it yourself
    'dob'   => encryptUserInfoField('1990-04-23', $apiSecret)  // optional cross-check
];
				
			

Request example:

				
					// Email & Mobile
{
    "user_info": {
        "email": "encrypted_email_address",
        "phone": "encrypted_phone_number"
    }
}

// CPF only (Brazil)
{
  "redirect_url": "https://your-website.com/callback",
  "country": "br",
  "business_settings_id": "5369a307-7b19-4890-a41d-6923c15549d6",
  "user_info": {
    "cpf": "encrypted_cpf"
  }
}

// CPF with date-of-birth cross-check
{
  "redirect_url": "https://your-website.com/callback",
  "country": "br",
  "business_settings_id": "5369a307-7b19-4890-a41d-6923c15549d6",
  "user_info": {
    "cpf": "encrypted_cpf",
    "dob": "encrypted_date_of_birth"
  }
}

// All background signals in one request (order follows your business settings)
{
  "redirect_url": "https://your-website.com/callback",
  "country": "br",
  "business_settings_id": "5369a307-7b19-4890-a41d-6923c15549d6",
  "user_info": {
    "email": "encrypted_email_address",
    "phone": "encrypted_phone_number",
    "cpf": "encrypted_cpf",
    "dob": "encrypted_date_of_birth"
  }
}
				
			

You should then be prepared to handle two different response formats.

When the background age check succeeds:

				
					{
    "verification_id": "abc123-def456-ghi789",
    "verification_status": "approved"
}
				
			

When the background age check fails, is not in use or isn’t available:

				
					{
    "start_verification_url": "https://sandbox.verifymyage.com/start/verification/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "verification_id": "abc123-def456-ghi789",
    "verification_status": "started"
}
				
			

Method Parameter

Using the method parameter will direct the user to verify using the method you specify first. If other methods are available, the user can choose to use one of these methods instead.

If this parameter isn’t used, the user will be presented with a list of verification methods determined by the business_settings_id or by the country parameter if the business_settings_id is not in use. 

You can use the method parameter with one of the following values:

Method Name Description
AgeEstimation

An age estimation method based on a person's facial features captured in a short selfie video.

Email

An age estimation method that uses only an email address to accurately determine user age while preserving privacy.

IDScan

An age verification method that uses ID scanning to determine a user's exact age.

IDScanFaceMatch

An age verification method that uses government-issued IDs to determine a user's age and employs face match technology to verify ID ownership.

Mobile

An age verification method confirming the phone is in the possession of and authorised for use by a person aged 18+.

CreditCard

An age verification method using credit card authorisation to confirm age.

DoubleBlind

The user uploads a scan of their ID and a selfie to match them to their ID via a 3rd party to ensure complete anonymity.

Example Request with Specific Verification Method

This example demonstrates how to direct the user to verify using their email address.

				
					POST /api/v3/verifications
Content-Type: application/json
Authorization: hmac {api_key}:{hmac_signature}

{
    "redirect_url": "https://your-website.com/callback",
    "country": "gb",
    "business_settings_id": "5369a307-7b19-4890-a41d-6923c15549d6",
    "method": "Email"
}
				
			

⚠️ NOTE

Ensure you’re using the correct API secret from the appropriate environment (sandbox or production). Using the wrong secret will result in encryption that cannot be decrypted by the verifymy service.

Error Responses

Status Code Message Description
400

invalid request

The request format is incorrect

401

unauthorized

Invalid API key or HMAC

500

internal server error

Server error

Step 2: Handle Immediate Response

You receive one of two response types:

Scenario A: Instant Approval (Background Check Success)

				
					{
"verification_id": "abc123-def456-ghi789",
"verification_status": "approved"
}
				
			

What this means:

  • User is verified immediately
  • No user interaction needed
  • You’re done – grant access!

Scenario B: User Interaction Required

				
					{
"verification_id": "abc123-def456-ghi789",
"verification_status": "started",
"start_verification_url": "https://verify.verifymyage.com/v/abc123..."
}
				
			

What this means:

  • Background check couldn’t verify age
  • User must complete interactive verification
  • Redirect user to start_verification_url

Step 3: User Completes Verification

This is the waiting period.

During this phase:

  • User is on the Verifymy platform
  • Completes verification process (typically 30s – 2 minutes)
  • Your system does nothing – just waits for callback


What happens:

  1. User sees verification interface
  2. Chooses verification method (if multiple available)
  3. Completes verification

Your role: Wait for the callback.

Step 4: Handle the Result

Option A: Redirect Callback

When verification completes, we redirect the user back to your redirect_url:

				
					https://yoursite.com/callback?verification_id=abc123-def456
				
			

Callback Parameters

Parameter Values Description
verification_id

UUID

Unique verification identifier

Your callback endpoint receives the verification_id, and you need to call the status endpoint to get the final status.

⚠️ NOTE

Deprecated parameters like account, code, scope, and state are transmitted during the redirect, you should safely ignore all of them.

Example request to get the final status

This example shows how to retrieve the final verification status using the verification_id:

				
					GET /api/v3/verifications/{verification_id}
Content-Type: application/json
Authorization: hmac {api_key}:{hmac_signature}
				
			

Verification payload example:

				
					{
        "approval_method": "Email",
        "verification_id": "abc123-def456",
        "status": "approved",
        "threshold": 18,
    ...
				
			

Approval_method is the method that approved the user, for example: Email, Mobile, CPF or AgeEstimation.

Status

Status Meaning Action
approved

Age verified successfully

Grant access to content/service

failed

Age could not be verified

Deny access

Visit the status docs page to find all details about what the status endpoint response includes and what each part means.

Option B: Webhook Notifications

💡 When to use webhooks

– You need intermediate event notifications, not just the final result
– You want real-time updates without polling the status endpoint

⚠️ NOTE

Webhook notifications do not fully replace the need for a callback to be available.

Make sure to set up the callback or a similar mechanism to keep polling the results from the status endpoint, as webhooks can fail or delay and leave end users at a dead end

This request uses both redirect and webhook.
The redirect handles the user’s browser, and the webhook notifies your server.

Verification payload example:

Request

				
					{
   "redirect_url": "https://example.com/verify/callback",
   "country": "gb",
   "webhook": "https://example.com/webhooks/verification",
   "webhook_notification_level": "minimal"
 }
				
			

For webhook payload structure, notification levels, and troubleshooting, check Notifications Webhook.

on this page