> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart OCR

> Use this API to upload images or PDFs of documents and extract structured fields. It also includes image quality checks, fraud detection and optional verification against government databases.

<Note> **Sandbox environment** is a testing environment and responses are mocked. For real time verifications, please use the **production environment**.</Note>


## OpenAPI

````yaml post /bharat-ocr
openapi: 3.0.0
info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  title: Cashfree Verification API's.
  version: '2023-12-18'
  description: >-
    Cashfree's Verification APIs provide different types of verification to our
    merchants.
servers:
  - description: Sandbox Server
    url: https://sandbox.cashfree.com/verification
  - description: Production Server
    url: https://api.cashfree.com/verification
security: []
tags:
  - name: Aadhaar
    description: Operations related to Aadhaar verification.
  - name: BAV V2
    description: Operations related to Bank account verification v2.
  - name: PAN
    description: Operations related to PAN verification.
  - name: Digilocker
    description: Operations related to Digilocker verification.
  - name: E-sign
    description: Operations related to E-sign verification.
  - name: Reverse Penny Drop
    description: Operations related to Reverse Penny Drop verification.
  - name: UPI Penny Drop
    description: Operations related to UPI Penny Drop verification.
  - name: Mobile Penny Drop
    description: Operations related to Mobile Penny Drop verification.
  - name: IP
    description: Operation related to IP verification.
  - name: UPI
    description: Operations related to UPI verification.
  - name: Passport
    description: Operation related to Passport verification.
  - name: CIN
    description: Operation related to CIN verification.
  - name: Name Match
    description: Operation related to Name Match verification.
  - name: PAN to GSTIN
    description: Operation related to PAN to GSTIN.
  - name: Face Match
    description: Operation related to Face Match verification.
  - name: Voter ID
    description: Operation related to Voter ID verification.
  - name: Reverse Geocoding
    description: Operation related to Reverse Geocoding.
  - name: Vehicle RC
    description: Operation related to Vehicle RC verification.
  - name: Driving License
    description: Operation related to Driving License verification.
  - name: GSTIN
    description: Operation related to GSTIN verification.
  - name: Account Aggregator
    description: Operations related to Account aggregator.
  - name: OTPLess
    description: Operations related to OTPLess Verification.
  - name: 1-Click
    description: Operations related to 1-Click.
  - name: Smart OCR
    description: Operations related to Smart OCR.
  - name: Geocoding
    description: Operations related to Geocoding.
  - name: Udyam
    description: Operation related to Udyam verification.
  - name: PAN to Udyam
    description: Operation related to PAN to Udyam.
paths:
  /bharat-ocr:
    post:
      tags:
        - Smart OCR
      summary: Smart OCR
      description: >-
        Use this API to upload images or PDFs of documents and extract
        structured fields. It also includes image quality checks, fraud
        detection and optional verification against government databases.
      operationId: VrsSmartOCR
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
        - $ref: '#/components/parameters/global_x_api_version'
      requestBody:
        $ref: '#/components/requestBodies/SmartOCRRequest'
      responses:
        '200':
          $ref: '#/components/responses/SmartOCRResponse'
        '400':
          $ref: '#/components/responses/Response400SmartOCR'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409DuplicateId'
        '422':
          $ref: '#/components/responses/Response422'
        '500':
          $ref: '#/components/responses/Response500V2'
        '502':
          $ref: '#/components/responses/Response502V2'
      security:
        - XClientID: []
          XClientSecret: []
components:
  parameters:
    x_cf_signature:
      description: >-
        Send the signature if two-factor authentication is selected as Public
        Key.  [More
        details](https://www.cashfree.com/docs/api-reference/vrs/getting-started#2fa-api-signature-generation).
      name: x-cf-signature
      in: header
      required: false
      schema:
        type: string
      example: ''
    global_x_api_version:
      description: API version to be used. Format is in YYYY-MM-DD.
      name: x-api-version
      in: header
      required: true
      schema:
        type: string
        default: '2024-12-01'
        example: '2024-12-01'
      example: '2024-12-01'
  requestBodies:
    SmartOCRRequest:
      description: Find the request parameters to perform Smart OCR verification.
      required: true
      content:
        multipart/form-data:
          schema:
            $ref: '#/components/schemas/SmartOCRRequestSchema'
  responses:
    SmartOCRResponse:
      description: >-
        Success response for retrieving the list of information associated with
        the mobile number.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SmartOCRResponseSchema'
          examples:
            PAN_OCR:
              value:
                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
                  glare: false
                  partially_present: false
                  black_and_white: false
                  face_present: true
                  face_clear: true
                  qr_present: false
                  obscured: false
                fraud_checks:
                  is_screenshot: true
                  is_photo_of_screen: false
                  is_photo_imposed: false
                  is_overwritten: false
                  is_forged: 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
            AADHAAR_FRONT_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: AADHAAR_FRONT
                document_fields:
                  address: >-
                    S / O Josh Doe, 202-parivar daser complex , dal  bazar ,
                    Gird , Gwalior , Lashkar City , Madhya Pradesh , 474019
                  dob: '2004-10-02'
                  father: Josh Doe
                  gender: Male
                  name: John Doe
                  uid: '123456789012'
                quality_checks:
                  blur: true
                  glare: false
                  partially_present: false
                  black_and_white: false
                  face_present: true
                  face_clear: true
                  qr_present: false
                  obscured: false
                fraud_checks:
                  is_screenshot: true
                  is_photo_of_screen: false
                  is_photo_imposed: false
                  is_overwritten: false
                  is_forged: false
                qr_details:
                  status: SECURE
                  name: John Doe
                  dob: '2001-10-02'
                  gender: Male
                  care_of: 'S / O : Josh Doe'
                  address: >-
                    S / O : Josh Doe, 202-parivar daser complex, parivar daser
                    complex, dal bazar, dal bazar, Lashkar City, Gird, Gwalior,
                    Gwalior, Madhya Pradesh - 474019"
                  split_address:
                    country: India
                    dist: Gwalior
                    house: 202-parivar daser complex
                    landmark: dal bazar
                    pincode: 474019
                    po: Lashkar City
                    state: Madhya Pradesh
                    street: parivar daser complex
                    subdist: Gird
                    vtc: Gwalior
                    locality: dal bazar
                  year_of_birth: 2001
                  aadhaar_last_four_digit: '9012'
                  email_linked: true
                  mobile_linked: true
                  mobile_hash: hashed_mobile_value
                  email_hash: hashed_email_value
                  photo_link: <base64 encoded image>
            AADHAAR_BACK_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: AADHAAR_BACK
                document_fields:
                  address: >-
                    S / O Josh Doe, 202-parivar daser complex , dal  bazar ,
                    Gird , Gwalior , Lashkar City , Madhya Pradesh , 474019
                  pincode: '474019'
                  uid: '123456789012'
                quality_checks:
                  blur: true
                  glare: false
                  partially_present: false
                  black_and_white: false
                  face_present: false
                  face_clear: false
                  qr_present: false
                  obscured: false
                fraud_checks:
                  is_screenshot: true
                  is_photo_of_screen: false
                  is_photo_imposed: false
                  is_overwritten: false
                  is_forged: false
                qr_details:
                  status: SECURE
                  name: John Doe
                  dob: '2001-10-02'
                  gender: Male
                  care_of: 'S / O : Josh Doe'
                  address: >-
                    S / O : Josh Doe, 202-parivar daser complex, parivar daser
                    complex, dal bazar, dal bazar, Lashkar City, Gird, Gwalior,
                    Gwalior, Madhya Pradesh - 474019"
                  split_address:
                    country: India
                    dist: Gwalior
                    house: 202-parivar daser complex
                    landmark: dal bazar
                    pincode: 474019
                    po: Lashkar City
                    state: Madhya Pradesh
                    street: parivar daser complex
                    subdist: Gird
                    vtc: Gwalior
                    locality: dal bazar
                  year_of_birth: 2001
                  aadhaar_last_four_digit: '9012'
                  email_linked: true
                  mobile_linked: true
                  mobile_hash: hashed_mobile_value
                  email_hash: hashed_email_value
                  photo_link: <base64 encoded image>
            DRIVING_LICENCE_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: DRIVING_LICENCE
                document_fields:
                  address: 123 Main Street, Sector 15, Noida, Uttar Pradesh
                  blood_group: B+
                  date_of_birth: '2004-10-02'
                  full_name: John Doe
                  guardian_name: Josh Doe
                  issuing_authority: Assam
                  license_issue_date: '2019-08-16'
                  license_expiry_date: '2024-05-13'
                  license_number: AB1120040002378
                  pin: '247001'
                  vehicle_class:
                    - issue_date: '2004-05-14'
                      vehicle_type: MCWG
                    - issue_date: '2004-05-14'
                      vehicle_type: LMV
                quality_checks:
                  blur: true
                  glare: false
                  partially_present: false
                  black_and_white: false
                  face_present: true
                  face_clear: true
                  qr_present: false
                  obscured: false
                fraud_checks:
                  is_screenshot: true
                  is_photo_of_screen: false
                  is_photo_imposed: false
                  is_overwritten: false
                  is_forged: false
                verification_details:
                  verification_id: verification-uuid-sample-456
                  reference_id: 9876544
                  dl_number: AB1120040002378
                  dob: '2004-10-02'
                  status: VALID
                  badge_details:
                    - badge_issue_date: '2019-08-16'
                      badge_no: DL002378
                      class_of_vehicle:
                        - MCWG
                        - LMV
                  dl_validity:
                    non_transport:
                      to: '2024-05-13'
                      from: '2019-08-16'
                    hazardous_valid_till: null
                    transport:
                      to: null
                      from: null
                    hill_valid_till: null
                  details_of_driving_licence:
                    date_of_issue: '2019-08-16'
                    date_of_last_transaction: '2022-08-15'
                    status: ACTIVE
                    last_transacted_at: '2022-08-15T14:30:00Z'
                    name: John Doe
                    father_or_husband_name: Josh Doe
                    address_list:
                      - complete_address: >-
                          123, Main Street, Sector 15, Noida, Uttar Pradesh,
                          247001
                        type: permanent
                        split_address:
                          district:
                            - GAUTAM BUDDHA NAGAR
                          state:
                            - - UTTAR PRADESH
                              - UP
                          city:
                            - NOIDA
                          pincode: '247001'
                          country:
                            - IN
                            - IND
                            - INDIA
                          address_line: 123, Main Street, Sector 15
                      - complete_address: >-
                          123, Main Street, Sector 15, Noida, Uttar Pradesh,
                          247001
                        type: temporary
                        split_address:
                          district:
                            - GAUTAM BUDDHA NAGAR
                          state:
                            - - UTTAR PRADESH
                              - UP
                          city:
                            - NOIDA
                          pincode: '247001'
                          country:
                            - IN
                            - IND
                            - INDIA
                          address_line: 123, Main Street, Sector 15
                    address: 123, Main Street, Sector 15, Noida, Uttar Pradesh, 247001
                    photo: >-
                      https://example-bucket.s3.amazonaws.com/sample-dl-photo-456.jpg
                    split_address:
                      district:
                        - GAUTAM BUDDHA NAGAR
                      state:
                        - - UTTAR PRADESH
                          - UP
                      city:
                        - NOIDA
                      pincode: '247001'
                      country:
                        - IN
                        - IND
                        - INDIA
                      address_line: 123, Main Street, Sector 15
                    cov_details: []
            VOTER_ID_FRONT_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: VOTER_ID_FRONT
                document_fields:
                  age_on_issue_date: '20'
                  dob: '2004-06-10'
                  epic_number: ABC1234567
                  gender: Male
                  issue_date: '2024-09-07'
                  name: John Doe
                  relative_name: Josh Doe
                  type_voter_id: New
            VOTER_ID_BACK_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: VOTER_ID_BACK
                document_fields:
                  address: >-
                    S / O Josh Doe, 202-parivar daser complex , dal  bazar ,
                    Gird , Gwalior , Lashkar City , Madhya Pradesh , 474019
                  age_on_issue_date: '20'
                  dob: '2004-06-10'
                  epic_number: ABC1234567
                  gender: Male
                  issue_date: '2024-09-07'
                  state: Madhya Pradesh
                  type_voter_id: New
            PASSPORT_FRONT_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: PASSPORT_FRONT
                document_fields:
                  birth_city: Gwalior
                  country_code: IND
                  dob: '1992-02-15'
                  expiry_date: '2023-06-05'
                  gender: M
                  given_name: John
                  issue_city: Gwalior
                  issue_date: '2013-06-06'
                  mrz:
                    line1: P<INDDOE<<JOHN<JOSH<<<<<<<<<<<<<<<<<<<<
                    line2: L1234567<0IND6402156M2306000<<<<<<<<<<<<<<<6
                  nationality: INDIAN
                  passport_number: L1234567
                  surname: Doe
            PASSPORT_BACK_OCR:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: VALID
                document_type: PASSPORT_BACK
                document_fields:
                  address: >-
                    S / O Josh Doe, 202-parivar daser complex , dal  bazar ,
                    Gird , Gwalior , Lashkar City , Madhya Pradesh , 474019
                  father_name: Josh Doe
                  file_number: AB1077777915526
                  mother_name: Josh Doe
                  old_issue_city: GHAZIABAD
                  old_issue_date: '2007-02-14'
                  old_passport_number: M1234567
                  passport_num: L1234567
                  pin: '474019'
                  spouse_name: Doe
            VEHICLE_RC_OCR:
              value:
                verification_id: test_verification_id1
                reference_id: 1358
                status: VALID
                document_type: VEHICLE_RC
                document_fields:
                  address: >-
                    S / O Josh Doe, 202-parivar daser complex , dal  bazar ,
                    Gird , Gwalior , Lashkar City , Madhya Pradesh , 474019
                  chassis_number: AB2A36FX5RCA68564
                  engine_number: ABCDEA82178
                  manufacturer_name: BAJAJ AUTO LTD
                  manufacturing_date: 2024-04
                  owner_name: John Doe
                  registration_date: '2024-05-22'
                  registration_number: UP12KD1234
                  registration_validity: '2039-05-21'
                  relation_name: Josh Doe
                  type: ind_rc
                  vehicle_model: PULSAR NS 200
                  vehicle_type: M-Cycle/Scooter
            CANCELLED_CHEQUE_OCR:
              value:
                verification_id: test_verification_id1
                reference_id: 1358
                status: VALID
                document_type: CANCELLED_CHEQUE
                document_fields:
                  ifsc: ABCD1234567
                  pincode: '522201'
                  account_number: '123456789012'
                  bank_name: State Bank Of India
                  cheque_number: '123456'
                  account_type: Current
                  micr_code: '2123456789'
                  contact: '8644225960'
                  branch: TENALI BAZAR
                  name: John Doe
                  split_address:
                    district: UNTUR DISTRICT
                    state: ANDHRA PRADESH
                    city: TENALI
                    pincode: '522201'
                    country: INDIA
                  address_line: >-
                    RMZ Eco world, Building 7 10th Floor, Devarabeesanahalli,
                    Marathalli Outer Ring road, Bangalore - 560103
                  issue_date: '2024-10-02'
                  expiry_date: '2024-10-30'
            INVOICE_OCR:
              value:
                verification_id: test_verification_id1
                reference_id: 1358
                status: VALID
                document_type: INVOICE
                document_fields:
                  vendor:
                    name: Tech Solutions Pvt Ltd
                    address: >-
                      1234, Business Park, MG Road, Bangalore, Karnataka,
                      560001, IN
                    contact: '9876543210'
                    email: contact@techsolutions.com
                    gstin: 29AALCT1234E1Z9
                    state: Karnataka
                    state_code: '29'
                    pan: AALCT1234E
                  buyer:
                    name: Global Enterprises
                    address: >-
                      5678, Industrial Complex, Sector 15, Noida, Uttar Pradesh,
                      201301, IN
                    contact_person: Ravi Kumar
                    contact: '9123456789'
                    gstin: 09AABCG1234C1Z5
                    state: Uttar Pradesh
                    state_code: '09'
                    place_of_supply: Uttar Pradesh
                  invoice_details:
                    invoice_number: INV-20250319-001
                    invoice_date: '2025-03-19'
                    order_reference:
                      order_ref_no: ORD-20250318-1234
                      order_ref_date: '2025-03-18'
                    indent:
                      indent_no: IND-20250317-5678
                      indent_date: '2025-03-17'
                    dispatched_through: XYZ Logistics
                    payment_terms: Net 30 Days
                    sales_person: John Doe
                    destination: Noida, Uttar Pradesh
                  line_items:
                    - item_no: 1
                      model_no: PROD-001
                      description: >-
                        Wireless Mouse Model X, 2.4 GHz, Black, Ergonomic
                        Design.
                      total_amount: 1200
                      unit_rate: 200
                      quantity: 6
                      alternate_quantity: 6
                      hsn_sac: '84716040'
                    - item_no: 2
                      model_no: PROD-002
                      description: Mechanical Keyboard, RGB Backlit, USB-C, 104 Keys.
                      total_amount: 3000
                      unit_rate: 750
                      quantity: 4
                      alternate_quantity: 4
                      hsn_sac: '84716090'
                  totals:
                    sub_total: 4200
                    igst: 0
                    cgst: 378
                    sgst: 378
                    round_off: 0
                    grand_total: 4956
                    amount_in_words: Four Thousand Nine Hundred Fifty-Six Only
                  bank_details:
                    bank_name: HDFC Bank
                    account_number: '123456789012'
                    branch_ifs: HDFC0000123
                    swift_code: HDFCINBBXXX
                  declaration: >-
                    This is a computer-generated invoice and does not require a
                    signature.
                  additional_info:
                    delivery_note: DN-20250319-001
                    po_no: PO-20250318-1234
                    po_date: '2025-03-18'
                    order_form_no: OF-20250318-5678
                    proforma_invoice_no: PI-20250318-001
                    proforma_invoice_date: '2025-03-18'
            INVALID:
              value:
                verification_id: test_verification_id
                reference_id: 1358
                status: INVALID
    Response400SmartOCR:
      description: Validation errors for Get UPI VPA with Mobile Number API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Verification ID Missing:
              $ref: '#/components/examples/VerificationIdMissing'
            Verification ID With Special Chars:
              $ref: '#/components/examples/VerificationIdWithSpecialCharacter'
            Verification ID Character Limit Exceeded:
              value:
                type: validation_error
                code: verification_id_length_exceeded
                message: verification_id can include a maximum of 50 characters.
            Both File And File URL Provided:
              value:
                type: validation_error
                code: file_and_file_url_both_provided
                message: Provide only one of the file or file_url in the request
            Both File And File URL Missing:
              value:
                type: validation_error
                code: file_and_file_url_missing
                message: The file and file_url both missing in the request
            Invalid File Type:
              value:
                type: validation_error
                code: file_type_invalid
                message: Provide a valid file or file_url
            Invalid File Content:
              value:
                type: validation_error
                code: file_content_invalid
                message: file contains prohibited JavaScript or active content
            Unsecure File URL:
              value:
                type: validation_error
                code: unsecure_file_downloaded
                message: Malware detected in the file downloaded
            File Name Length Exceeded:
              value:
                type: validation_error
                code: file_name_length_exceeded
                message: File name should not be more than 50 characters
            Invalid File Name:
              value:
                type: validation_error
                code: file_name_invalid
                message: File name is invalid
            File Content Too Large:
              value:
                type: validation_error
                code: file_content_too_large
                message: >-
                  The file content exceeds the allowable size of 5MB for
                  processing
            Do Verification Flag Constrain:
              value:
                type: validation_error
                code: verification_not_allowed
                message: >-
                  do_verification flag is currently available for only PAN
                  document
            Client ID/Client Secret in Missing:
              $ref: '#/components/examples/XClientIdMissing'
            Using-Test-Credentials-in-Prod:
              $ref: '#/components/examples/UsingTestCredentialsInProd'
    Response401:
      description: Invalid client ID and client secret combination.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Invalid client ID and client secret combination:
              value:
                type: authentication_error
                code: authentication_failed
                message: Invalid clientId and clientSecret combination
    Response403:
      description: Authentication error (IP not whitelisted).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            IP not whitelisted:
              value:
                type: authentication_error
                code: ip_validation_failed
                message: >-
                  IP not whitelisted your current ip is 106.51.91.104.For IP
                  whitelisting assistance, visit our guide at
                  https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification
            x-cf-signature header missing:
              value:
                type: validation_error
                code: authentication_failed
                message: x-cf-signature missing in the request header
    Response409DuplicateId:
      description: Conflict error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Conflict Error:
              value:
                type: validation_error
                code: verification_id_already_exists
                message: verification ID already exists
    Response422:
      description: >-
        Validation error because of insufficient balance to process this
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Insufficient balance:
              value:
                type: validation_error
                code: insufficient_balance
                message: Insufficient balance to process this request
    Response500V2:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: something went wrong
    Response502V2:
      description: Gateway error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Bad Gateway:
              value:
                type: internal_error
                code: verification_failed
                message: verification attempt failed
  schemas:
    SmartOCRRequestSchema:
      type: object
      example:
        verification_id: test_verification_id
        document_type: PAN
        file: abc
        file_url: https://linkofFile
        do_verification: true
      required:
        - verification_id
        - document_type
        - file
      properties:
        verification_id:
          type: string
          description: >-
            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
          default: test_verification_id
        document_type:
          type: string
          description: >-
            Tag depicts the document type of the file being shared in the
            request.
          enum:
            - PAN
            - AADHAAR
            - DRIVING_LICENCE
            - VOTER_ID
            - PASSPORT
            - VEHICLE_RC
            - CANCELLED_CHEQUE
            - INVOICE
          example: PAN
        file:
          format: binary
          description: >-
            Image of the document. Allowed file types: JPEG, JPG, PNG or PDF.
            The maximum size of an image and a PDF file is 5 MB. Conditionally
            required when file_url is missing. Use image file for better latency
            of the api.
          type: string
          example: image
        file_url:
          type: string
          description: >-
            Public URL of the image. Allowed only https URL. Allowed file types:
            JPEG, JPG, PNG or PDF. The maximum size of image and pdf file are 5
            MB and 1 MB respectively. Conditionally required when the file is
            missing. Use image file link for better latency of the api.
          example: https://linkofFile
          default: file_url
        do_verification:
          type: boolean
          description: >-
            When set to `true`, performs real-time verification of extracted
            document data against government databases. Adds a
            `verification_details` section to the response with validation
            results. Currently supports: **PAN Card** and **Driving Licence**
            verification.
          example: true
          default: false
    SmartOCRResponseSchema:
      type: object
      properties:
        verification_id:
          type: string
          description: It is the unique ID shared by the merchant for each request.
          example: test_verification_id
        reference_id:
          type: integer
          description: >-
            It displays the unique ID created by Cashfree Payments for document
            OCR reference purposes.
          example: 1358
        document_type:
          type: string
          description: >-
            The field will show the document_type shared or predicted if it is
            not shared in the request.
          example: VOTED_ID
        document_fields:
          type: object
          description: Structure with all the relevant fields in the input image.
          properties:
            voter_id_number:
              type: string
              description: It displays the voter ID number.
              example: ABC1234567
            name:
              type: string
              description: It displays the name of the voter ID holder.
              example: John Doe
            guardian_name:
              type: string
              description: It displays the name of the guardian of the voter ID holder.
              example: Josh Doe
            gender:
              type: string
              description: It displays the gender of the voter ID holder.
              example: Male
            date_of_birth:
              type: string
              description: It displays the date of birth of the ID holder.
              example: '2001-10-02'
            address:
              type: string
              description: It displays the address of the voter ID holder.
              example: >-
                RMZ Eco world, Building 7 10th Floor, Devarabeesanahalli,
                Marathalli Outer Ring road, Bangalore - 560103
            date_of_issue:
              type: string
              description: It displays the date of issue of the voter ID.
              example: '2023-08-15'
        quality_checks:
          type: object
          description: >
            Contains all the quality checks the product performs on the given
            input image.

            **Note:**  This field can return `true`, `false`, or `null`.
          properties:
            blur:
              type: boolean
              nullable: true
              description: Conveys whether the image is blurred or not.
              example: false
            glare:
              type: boolean
              nullable: true
              description: Conveys if glare is present in the image.
              example: false
            partially_present:
              type: boolean
              nullable: true
              description: Conveys whether the image is partially present or not.
              example: false
            black_and_white:
              type: boolean
              nullable: true
              description: Conveys if the image is black and white.
              example: true
            face_present:
              type: boolean
              nullable: true
              description: Conveys whether the document in the image has a face present.
              example: true
            face_clear:
              type: boolean
              nullable: true
              description: Conveys whether the face on the document is clear.
              example: true
            qr_present:
              type: boolean
              nullable: true
              description: Conveys whether the document in the image has a QR.
              example: false
            obscured:
              type: boolean
              nullable: true
              description: Conveys whether the document in the image is obscured.
              example: false
        fraud_checks:
          type: object
          description: |
            It displays the personal information of the mobile number holder.
            **Note:** This field can return `true`, `false`, or `null`.
          properties:
            is_screenshot:
              type: boolean
              nullable: true
              description: Conveys true if the image input is a screenshot.
              example: false
            is_photo_of_screen:
              type: boolean
              nullable: true
              description: Conveys true if the input photo is the photo of a screen.
              example: false
            is_photo_imposed:
              type: boolean
              nullable: true
              description: >-
                Conveys true if another image imposes the photo of the face on
                the document.
              example: false
            is_overwritten:
              type: boolean
              nullable: true
              description: Conveys true if any field on the document is overwritten.
              example: false
            is_forged:
              type: boolean
              nullable: true
              description: Conveys true if any field on the document is forged.
              example: false
        qr_details:
          type: object
          description: >
            It displays the details extracted from QR code present on the
            document.
          properties:
            status:
              type: string
              description: |
                Status of the QR on the document. Possible values are:
                   - `NOT_PRESENT`: QR is not present on the document.
                   - `UNPROCESSABLE`: QR is present, but not processable.
                   - `SECURE`: QR present is in securely encrypted format.
                   - `PRIMITIVE`: QR present is of old unencrypted format. Information like photo_link, mobile_linked, email_linked, mobile_hash, email_hash is not present.
              enum:
                - SECURE
                - PRIMITIVE
                - NOT_PRESENT
                - UNPROCESSABLE
              example: SECURE
            name:
              type: string
              nullable: true
              description: Name of the individual.
              example: John Doe
            dob:
              type: string
              nullable: true
              description: Date of birth of the individual.
              example: '1979-01-01T00:00:00.000Z'
            gender:
              type: string
              nullable: true
              description: Gender of the individual.
              example: Male
            care_of:
              type: string
              nullable: true
              description: Name of the guardian or care of.
              example: S / O Josh Doe
            address:
              type: string
              nullable: true
              description: Full address of the individual.
              example: >-
                House No 120, M.V-30, Ward No 04, Kambeda, Orkel, Malkangiri,
                Kamwada, Odisha - 764051
            split_address:
              type: object
              nullable: true
              description: Split address details.
              properties:
                country:
                  type: string
                  description: Country of the address.
                  example: India
                dist:
                  type: string
                  description: District of the address.
                  example: Malkangiri
                house:
                  type: string
                  description: House number of the address.
                  example: House No 120
                landmark:
                  type: string
                  nullable: true
                  description: Landmark near the address.
                  example: Near ABC Complex
                pincode:
                  type: integer
                  description: Pincode of the address.
                  example: 764051
                po:
                  type: string
                  description: Post office of the address.
                  example: Kambeda
                state:
                  type: string
                  description: State of the address.
                  example: Odisha
                street:
                  type: string
                  description: Street of the address.
                  example: M.V-30
                subdist:
                  type: string
                  description: Sub-district of the address.
                  example: Orkel
                vtc:
                  type: string
                  description: Village or town of the address.
                  example: Kamwada
                locality:
                  type: string
                  description: Locality of the address.
                  example: Ward No 04
            year_of_birth:
              type: integer
              nullable: true
              description: Year of birth of the individual.
              example: 1979
            aadhaar_last_four_digit:
              type: string
              nullable: true
              description: Last four digits of the Aadhaar number.
              example: 3783
            email_linked:
              type: boolean
              nullable: true
              description: Email linked to the Aadhaar.
              example: true
            mobile_linked:
              type: boolean
              nullable: true
              description: Mobile number linked to the Aadhaar.
              example: true
            mobile_hash:
              type: string
              nullable: true
              description: Hashed mobile number.
              example: hashed_mobile_value
            email_hash:
              type: string
              nullable: true
              description: Hashed email address.
              example: hashed_email_value
            photo_link:
              type: string
              nullable: true
              description: Link to the photo associated with the Aadhaar.
              example: <base64 encoded image>
        verification_details:
          type: object
          description: >-
            Contains detailed verification information specific to the document
            type being verified.
          oneOf:
            - title: PAN Verification Details
              type: object
              properties:
                reference_id:
                  type: integer
                  description: >-
                    Unique ID created by Cashfree Payments for document
                    verification reference purposes.
                pan:
                  type: string
                  description: >-
                    The unique 10-character alphanumeric identifier of the
                    individual issued by the Income Tax Department. The first 5
                    should be alphabets followed by 4 numbers and the 10th
                    character should again be an alphabet.
                  example: ABCTY1234D
                name:
                  type: string
                  description: Name of the individual as per the PAN records.
                  example: John Doe
                dob:
                  type: string
                  description: >-
                    Date of birth of the individual as per the PAN records.
                    Format is YYYY-MM-DD.
                  example: '1993-06-30'
                name_match:
                  type: string
                  description: >-
                    Result of name match verification.

                    Possible values:

                    - `Y` : The name entered matches with the name present on
                    the PAN.

                    - `N` : The name entered does not match with the name
                    present on the PAN.
                  example: 'Y'
                dob_match:
                  type: string
                  description: >-
                    Result of the date of birth verification.

                    Possible values:

                    - `Y` : The date of birth matches with the date of birth
                    present on PAN.

                    - `N` : The date of birth does not match with the date of
                    birth present on PAN.
                  example: 'Y'
                pan_status:
                  type: string
                  description: |-
                    Status of the PAN information.
                    Possible values:
                      - `E` : The entered PAN information is valid.
                      - `EC`: The entered PAN information exists and is valid but marked as Acquisition.
                      - `N` : The entered PAN information does not exist in the database.
                      - `X` : The entered PAN information has been deactivated.
                      - `F` : The entered PAN information is fake.
                      - `D` : The entered PAN information has been deleted.
                      - `EA` : The entered PAN information is valid but marked as Amalgamation.
                      - `ED` : The entered PAN information is valid but marked as Death.
                      - `EI` : The entered PAN information is valid but marked as Dissolution.
                      - `EL` : The entered PAN information is valid but marked as Liquidated.
                      - `EM` : The entered PAN information is valid but marked as Merger.
                      - `EP` : The entered PAN information is valid but marked as Partition.
                      - `ES` : The entered PAN information is valid but marked as Split.
                      - `EU` : The entered PAN information is valid but marked as Under Liquidation.
                  example: E
                status:
                  type: string
                  description: |-
                    Status of PAN verification.
                    Possible values:
                    - `VALID`
                    - `INVALID`
                  example: VALID
                aadhaar_seeding_status:
                  type: string
                  description: >-
                    Whether the individual linked the Aadhaar information with
                    PAN.

                    Possible values:

                    - `Y`: Aadhaar is linked to PAN

                    - `R`: Aadhaar is not linked to PAN

                    - `NA`: Not applicable, in case of business PAN
                  example: 'Y'
                aadhaar_seeding_status_desc:
                  type: string
                  description: >-
                    Additional information about the linking of Aadhaar and PAN
                    card.
                  example: Aadhaar is linked to PAN
            - title: Driving Licence Verification Details
              type: object
              properties:
                verification_id:
                  type: string
                  description: >-
                    Unique verification ID for the driving licence verification
                    request.
                  example: verification-uuid-sample-123
                reference_id:
                  type: integer
                  description: >-
                    Unique reference ID created by Cashfree Payments for
                    verification purposes.
                  example: 9876543
                dl_number:
                  type: string
                  description: Driving licence number being verified.
                  example: UP1220200001234
                dob:
                  type: string
                  description: >-
                    Date of birth as per the driving licence. Format is
                    YYYY-MM-DD.
                  example: '1990-05-15'
                status:
                  type: string
                  description: |-
                    Status of driving licence verification.
                    Possible values:
                    - `VALID`
                    - `INVALID`
                  example: VALID
                badge_details:
                  type: array
                  description: >-
                    Details about the driving licence badges and vehicle
                    classes.
                  items:
                    type: object
                    properties:
                      badge_issue_date:
                        type: string
                        nullable: true
                        description: Date when the badge was issued.
                        example: '2020-05-15'
                      badge_no:
                        type: string
                        nullable: true
                        description: Badge number if applicable.
                        example: DL001234
                      class_of_vehicle:
                        type: array
                        description: >-
                          List of vehicle classes the licence holder is
                          authorized to drive.
                        items:
                          type: string
                        example:
                          - MCWG
                          - LMV
                dl_validity:
                  type: object
                  description: Validity periods for different vehicle categories.
                  properties:
                    non_transport:
                      type: object
                      description: Validity for non-transport vehicles.
                      properties:
                        to:
                          type: string
                          description: Validity end date for non-transport vehicles.
                          example: '2030-05-14'
                        from:
                          type: string
                          description: Validity start date for non-transport vehicles.
                          example: '2020-05-15'
                    transport:
                      type: object
                      nullable: true
                      description: Validity for transport vehicles.
                      properties:
                        to:
                          type: string
                          nullable: true
                          description: Validity end date for transport vehicles.
                        from:
                          type: string
                          nullable: true
                          description: Validity start date for transport vehicles.
                    hazardous_valid_till:
                      type: string
                      nullable: true
                      description: Validity date for hazardous materials transport.
                    hill_valid_till:
                      type: string
                      nullable: true
                      description: Validity date for hill region driving.
                details_of_driving_licence:
                  type: object
                  description: Comprehensive details of the driving licence.
                  properties:
                    date_of_issue:
                      type: string
                      description: Date when the driving licence was issued.
                      example: '2020-05-15'
                    date_of_last_transaction:
                      type: string
                      nullable: true
                      description: Date of the last transaction on the licence.
                      example: '2022-03-10'
                    status:
                      type: string
                      description: Current status of the driving licence.
                      example: ACTIVE
                    last_transacted_at:
                      type: string
                      nullable: true
                      description: Timestamp of the last transaction.
                      example: '2022-03-10T10:30:00Z'
                    name:
                      type: string
                      description: Name of the licence holder.
                      example: JOHN DOE
                    father_or_husband_name:
                      type: string
                      description: Father's or husband's name of the licence holder.
                      example: ROBERT DOE
                    address:
                      type: string
                      description: Address of the licence holder.
                      example: >-
                        123, Main Street, Sector 15, Noida, Uttar Pradesh,
                        201301
                    photo:
                      type: string
                      description: URL to the licence holder's photo.
                      example: >-
                        https://example-bucket.s3.amazonaws.com/sample-dl-photo.jpg
    ErrorResponseSchema:
      type: object
      properties:
        code:
          type: string
          example: x-client-id_missing
        error:
          type: object
          example:
            ref_id: 102
        message:
          type: string
          example: x-client-id is missing in the request.
          description: It displays the outcome of the error.
        type:
          type: string
          example: validation_error
          description: It displays the type of error.
  examples:
    VerificationIdMissing:
      value:
        type: validation_error
        code: verification_id_missing
        message: verification_id is missing in the request.
    VerificationIdWithSpecialCharacter:
      value:
        type: validation_error
        code: verification_id_value_invalid
        message: >-
          verification_id can include only alphanum, dot, hyphen and
          underscores.
    XClientIdMissing:
      value:
        type: validation_error
        code: x-client-id_missing
        message: x-client-id is missing in the request.
    UsingTestCredentialsInProd:
      value:
        type: validation_error
        code: x-client-secret_value_invalid
        message: Client secret belongs to test environment
  securitySchemes:
    XClientID:
      type: apiKey
      in: header
      name: x-client-id
      description: >-
        Your unique client identifier issued by Cashfree. You can find this in
        your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        The secret key associated with your client ID. Use this to authenticate
        your API requests. You can find this in your [Merchant
        Dashboard](https://merchant.cashfree.com/verificationsuite/developers/api-keys).

````