Skip to main content

Pre-requisites

1. Callback Url

A callback endpoint must be provided beforehand to receive the details of an initiated verification. This can be set on Metric's Partners Platform. Settings > Webhooks > Liveness Url

2. Expected Payload

The following example payload structure will be sent to the provided callback endpoint:

{
"score": 50,
"liveness_status": "SUCCESSFUL",
"reference_id": "P0123456",
"base64_image": "XXXXXXXXX",
}
  • score: A value between 0 - 100 which represents the liveness score obtained from a capture session.
  • liveness_status: “SUCCESSFUL” or “FAILED”. A string representing the summarized results of a verification per capture session.
  • reference_id: A string representing the reference ID for the verification.
  • base64_image: A string representing the Base64 Image of the user captured during a verification session.

3. Expected Response

Once you've provided the callback endpoint, we'll send a request and await a response in the following format:

{
"status": "SUCCESSFUL"
}
status: A string indicating the next actions for the capture modal. It can have one of the following values:
  • SUCCESSFUL: Indicates a successful verification, and directs the capture modal to close immediately.
  • FAILED: Indicates a verification failure, and directs the capture modal to close immediately.
  • RETRY: Directs the modal to offer a retry option to the user during the capture session.