Skip to main content
POST
/
face-liveness
Face Liveness Check
curl --request POST \
  --url https://sandbox.cashfree.com/verification/face-liveness \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --form verification_id=test_verification_id \
  --form image='@example-file'
{
  "reference_id": 1078756,
  "verification_id": "asbfhjjree1247",
  "status": "SUCCESS",
  "liveness": true,
  "liveness_score": 0.98,
  "gender": {
    "value": "FEMALE",
    "confidence": 98.4
  },
  "age_range": {
    "min": 29,
    "max": 37
  },
  "eye_wear": {
    "value": true,
    "confidence": 96.4
  },
  "face_occluded": {
    "value": false,
    "confidence": 98.7
  },
  "quality": {
    "blur": false,
    "bright": true,
    "exposure": "NEUTRAL"
  },
  "pose": {
    "face_alignment": "LEFT",
    "head_turned": false
  },
  "eyes_open": {
    "value": true,
    "confidence": 95.5
  }
}

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-cf-signature
string

Send the signature if two-factor authentication is selected as Public Key. More details

x-api-version
string
default:2024-12-01
required

API version to be used. Format is in YYYY-MM-DD.

Example:

"2024-12-01"

Body

multipart/form-data

Find the request parameters of Face Liveness Check.

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 liveness of the image. Supported types are jpeg, jpg and png.

Example:

"<image_file>"

Response

Success response for checking the face liveness.

reference_id
integer

Unique reference ID generated by Cashfree.

Example:

1078756

verification_id
string

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

Example:

"asbfhjjree1247"

status
string

The status of the face liveness verification request. Possible values:

  • SUCCESS: Face verification completed successfully
  • REAL_FACE_NOT_DETECTED: The submitted image does not contain a real face
  • MULTIPLE_FACES_DETECTED: More than one face detected in the image
  • FACE_NOT_DETECTED: No face detected in the submitted image
Example:

"SUCCESS"

liveness
boolean

Indicates whether the detected face exhibits signs of being from a live person.

Example:

true

liveness_score
number<float>

A confidence score between 0 and 1 indicating the probability that the face is from a live person.

Example:

0.98

gender
object
age_range
object
eye_wear
object
face_occluded
object
quality
object
pose
object
eyes_open
object