POST
/
face-match
{
  "status": "SUCCESS",
  "ref_id": 21637861,
  "verification_id": "21637861",
  "face_match_result": "YES",
  "face_match_score": 0.95,
  "mask_detected_first_image": true,
  "mask_detected_score_first_image": 0.7,
  "mask_detected_second_image": true,
  "mask_detected_score_second_image": 0.7
}

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.

Body

multipart/form-data

Find the request parameters to verify facial features in two images

first_image
file
required

It is the scanned copy of Image 1. Allowed file types are JPEG, JPG, and PNG, with a maximum file size of 10 MB for each file.

second_image
file
required

It is the scanned copy of Image 2. Allowed file types are JPEG, JPG, and PNG, with a maximum file size of 10 MB for each file.

verification_id
string
default:
12345678
required

It is the unique ID you need to create to identify the verification request. The maximum character limit is 50, and only alphanumeric characters, periods (.), hyphens (-), and underscores (_) are allowed.

align_horizontally
boolean

It is a boolean value to align the images horizontally before analysing the facial features.

detect_mask_first_image
boolean

It is a boolean value to identify whether the person in the first image is wearing a mask.

detect_mask_second_image
boolean

It is a boolean value to identify whether the person in the second image is wearing a mask.

threshold
string
default:
0.7

It is the value to distinguish and match the facial features of the two images. The range is between 0 and 1. The default value is set as 0.7. We conclude that the images match when the analysis is or greater than the value set for threshold. Range: 0 < x < 1

Response

200 - application/json

Success response for Face Match API

face_match_result
string

It displays the result of the face match verification request. Possible values are:

  • YES: The face match is positive i.e. the given 2 photos match.
  • NO: The face match is negative i.e. the given 2 photos don't match.
face_match_score
number

It displays the score of the face match verification request. Range: 0 < x < 1

maskDetected_first_image
boolean

It displays whether the individual in the image 1 is wearing a mask. Possible values are:

  • true: Individual is wearing a mask.
  • false: Individual is not wearing a mask.
maskDetected_score_first_image
string

It displays the score of the mask detection analysis for image 1. Range: 0 < x < 1

maskDetected_score_second_image
string

It displays the score of the mask detection analysis for image 2. Range: 0 < x < 1

maskDetected_second_image
boolean

It displays whether the individual in the image 2 is wearing a mask. Possible values are:

  • true: Individual is wearing a mask.
  • false: Individual is not wearing a mask.
ref_id
integer

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

status
string

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

  • SUCCESS: A successful face match returns all fields in the response.
verification_id
string

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

Was this page helpful?