POST
/
liveliness
curl --request POST \
  --url https://sandbox.cashfree.com/verification/liveliness \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --form verification_id=test_verification_id \
  --form 'image=<image_file>' \
  --form strict_check=true
{
  "reference_id": 1357,
  "verification_id": "123456",
  "status": "SUCCESS",
  "liveliness": true,
  "score": 0.95
}

Authorizations

x-client-id
string
header
required

Client ID. You can find your ID in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Headers

x-cf-signature
string

Send the signature if IP is not whitelisted

Body

multipart/form-data
Find the request parameters to verify if the customer is genuine and not a bot

Find the request parameters to check the liveliness in an image

verification_id
string
default:test_verification_id
required

It is the unique ID you create to identify the verification request. The maximum character limit is 50. Only alphanumeric, period (.), hyphen (-) and underscore ( _ ) are allowed.

Example:

"test_verification_id"

image
file
required

Upload the image of the individual to verify the liveliness of the image. Supported types(jpeg/jpg/png)

strict_check
boolean

It is the boolean value to set the strictness check of the image. Default value for strict_check is false.

Example:

true

Response

200
application/json
Success response for checking the liveliness of your customer

Success response for Liveliness Check API

reference_id
integer

It displays the unique ID created by Cashfree Payments for reference purposes. format: int64

Example:

1357

verification_id
string

It displays the unique ID you created to identify the API request.

Example:

"123456789"

status
string

It displays the status of the API request. Possible values are:

  • SUCCESS: A face is detected.
  • FACE_NOT_DETECTED: A face is not detected.
  • MULTIPLE_FACE_DETECTED: Multiple faces are detected.
Example:

"SUCCESS"

liveliness
boolean

It displays the result of the liveliness check.

Example:

true

score
number

It displays the score of the liveliness check. Range: 0 < x < 1

Example:

0.95