POST
/
bharat-ocr
curl --request POST \
  --url https://sandbox.cashfree.com/verification/bharat-ocr \
  --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 document_type=PAN \
  --form file=abc \
  --form file_url=https://linkofFile \
  --form do_verification=true
{
  "verification_id": "test_verification_id",
  "reference_id": 1358,
  "status": "VALID",
  "document_type": "PAN",
  "document_fields": {
    "pan": "DUXPR7763F",
    "dob": "2004-10-02",
    "name": "John Doe",
    "father": "Josh Doe"
  },
  "quality_checks": {
    "blur": true,
    "partially_present": false,
    "black_and_white": false,
    "face_present": true,
    "face_clear": true,
    "qr_present": false
  },
  "fraud_checks": {
    "is_screenshot": true,
    "is_photo_of_screen": false
  },
  "verification_details": {
    "reference_id": 98237899,
    "status": "VALID",
    "pan": "DUXPR7763F",
    "name": "John Doe",
    "dob": "2004-10-02",
    "name_match": "Y",
    "dob_match": "Y",
    "pan_status": "E",
    "aadhaar_seeding_status": "Y",
    "aadhaar_seeding_status_desc": "Aadhaar is linked to PAN"
  }
}

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

x-api-version
string
required

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

Body

multipart/form-data
Find the request parameters to perform BharatOCR verification.

Request parameters for BharatOCR.

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 alphaumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.

Example:

"test_verification_id"

document_type
string
default:PAN
required

Tag depicts the document type of the file being shared in the request. Allowed values are PAN, AADHAAR, DRIVING_LICENCE, VOTER_ID, PASSPORT, VEHICLE_RC, CANCELLED_CHEQUE, and INVOICE.

Example:

"PAN"

file
file
required

Image of the document. Allowed file types: JPEG, JPG, or PNG. The maximum file size is 5 MB. Conditionally required when image_url is missing.

file_url
string
default:file_url

Public URL of the image. Allowed only https URL. Allowed file types: JPEG, JPG, or PNG. The maximum file size is 5 MB. Conditionally required when the image is missing.

Example:

"https://linkofFile"

do_verification
boolean
default:false

Indicates whether PAN verification should be performed (currently only PAN supported). When set to true, validates PAN details including unique identifier, name, date of birth, etc. Helps with customer onboarding, KYC compliance, and fraud prevention.

Example:

"true"

Response

200
application/json

Success response for retrieving the list of information associated with the mobile number.

verification_id
string

It is the unique ID shared by the merchant for each request.

Example:

"test_verification_id"

reference_id
integer

It displays the unique ID created by Cashfree Payments for document OCR reference purposes.

Example:

1358

document_type
string

The field will show the document_type shared or predicted if it is not shared in the request.

Example:

"VOTED_ID"

document_fields
object

Structure with all the relevant fields in the input image.

quality_checks
object

Contains all the quality checks the product performs on the given input image.

fraud_checks
object

It displays the personal information of the mobile number holder.

verification_details
object

It displays the personal information of the mobile number holder.