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

# Submit OTP to Verify Aadhaar

> Use this API to verify aadhaar by submitting the OTP received on the mobile number linked to the aadhaar information. You also need to enter the reference ID received in the response of Generate OTP to Verify Aadhaar API. View the [test data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-okyc) and use the information to trigger the validations. The test data are usable only in the test environments such as sandbox.



## OpenAPI

````yaml post /offline-aadhaar/verify
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: 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: Liveliness
    description: Operation related to Liveliness.
  - 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: BharatOCR
    description: Operations related to BharatOCR.
paths:
  /offline-aadhaar/verify:
    post:
      tags:
        - Aadhaar
      summary: Submit OTP to Verify Aadhaar
      description: >-
        Use this API to verify aadhaar by submitting the OTP received on the
        mobile number linked to the aadhaar information. You also need to enter
        the reference ID received in the response of Generate OTP to Verify
        Aadhaar API. View the [test
        data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#aadhaar-okyc)
        and use the information to trigger the validations. The test data are
        usable only in the test environments such as sandbox.
      operationId: VrsOfflineAadhaarVerifyOtp
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
      requestBody:
        $ref: '#/components/requestBodies/OfflineAadhaarVerifyOtpRequest'
      responses:
        '200':
          $ref: '#/components/responses/OfflineAadhaarVerifyOtpResponse'
        '400':
          $ref: '#/components/responses/Response400VerifyOtp'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409SubmitOtp'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500AllCases'
        '502':
          $ref: '#/components/responses/Response502V2AuthorizedSourceDown'
      security:
        - XClientID: []
          XClientSecret: []
components:
  parameters:
    x_cf_signature:
      description: Send the signature if IP is not whitelisted.
      name: x-cf-signature
      in: header
      required: false
      schema:
        type: string
      example: ''
  requestBodies:
    OfflineAadhaarVerifyOtpRequest:
      description: Find the request parameters to submit the generated OTP
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OfflineAadhaarVerifyOtpRequestSchema'
  responses:
    OfflineAadhaarVerifyOtpResponse:
      description: >-
        Success response for submitting the generated OTP for offline aadhaar
        verification
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OfflineAadhaarVerifyOtpResponseSchema'
          examples:
            VALID:
              value:
                ref_id: '70471'
                status: VALID
                message: Aadhaar Card Exists
                care_of: 'S/O: Fakkirappa Dollin'
                address: >-
                  Shri Kanaka Nilaya,,Umashankar Nagar 1st Main 5th
                  Cross,Ranebennur,Haveri-Karnataka,India
                dob: 02-02-1995
                email: ''
                gender: M
                name: Mallesh Fakkirappa Dollin
                split_address:
                  country: India
                  dist: Haveri
                  house: Shri Kanaka Nilaya
                  landmark: ''
                  pincode: 581115
                  po: Ranebennur
                  state: Karnataka
                  street: Umashankar Nagar 1st Main 5th Cross
                  subdist: Ranibennur
                  vtc: Ranibennur
                  locality: Pritam Pura
                year_of_birth: 1995
                mobile_hash: >-
                  ed189eb73247cb90b769e7e8d7dfd2efa4cd6a5ec27602f5d2721c035266568c
                photo_link: <base64 encoded image>
                share_code: '1234'
                xml_file: <xml file link with 48hrs expiry>
    Response400VerifyOtp:
      description: Validation errors for Submit OTP for Aadhaar Verification API
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Session Expired:
              $ref: '#/components/examples/WhenSessionEXPIRED'
            Invalid Aadhaar:
              $ref: '#/components/examples/WhenInvalidAadhaar'
            Aadhaar Not Linked To Mobile Number:
              $ref: '#/components/examples/WhenAadhaarNotLinkedToMobileNumber'
            OTP Expired:
              $ref: '#/components/examples/WhenOtpExpired'
            OTP Format Invalid:
              $ref: '#/components/examples/WhenOtpEnteredIsOfInvalidFormat'
            OTP Empty:
              $ref: '#/components/examples/WhenOtpIsNotEntered'
            OTP Invalid:
              $ref: '#/components/examples/WhenEnteredOtpIsInvalid'
            Client ID/Client Secret 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
    Response409SubmitOtp:
      description: Conflict error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Conflict Error:
              value:
                type: validation_error
                code: verification_pending
                message: Processing request, please try after 30 sec
    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
    Response429:
      description: Rate limit exceed error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Rate limit error per operation:
              value:
                type: rate_limit_error
                code: too_many_requests_per_operation
                message: Too many requests for this operation, rate limit reached
            Rate limit error per IP:
              value:
                type: rate_limit_error
                code: too_many_requests_per_ip
                message: Too many requests from the IP, rate limit reached
    Response500AllCases:
      description: Internal errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: Unable to validate, please retry later
                error:
                  refId: 209
            Unknown Error Occured:
              value:
                type: internal_error
                code: api_error
                message: something went wrong, please try after some time
    Response502V2AuthorizedSourceDown:
      description: Gateway error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Bad Gateway:
              value:
                type: internal_error
                code: verification_failed
                message: >-
                  Authorised source is temporarily unavailable, please try again
                  shortly
  schemas:
    OfflineAadhaarVerifyOtpRequestSchema:
      type: object
      example:
        otp: '267987'
        ref_id: '21637861'
      required:
        - otp
        - ref_id
      properties:
        otp:
          description: >-
            It is the OTP received on the registered phone number for offline
            aadhaar verification.
          type: string
          example: '267987'
          default: '267987'
        ref_id:
          description: >-
            It is the unique ID created by Cashfree Payments that you receive in
            the response of Generate OTP to Verify Aadhaar API.
          type: string
          example: '21637861'
          default: '21637861'
    OfflineAadhaarVerifyOtpResponseSchema:
      type: object
      properties:
        ref_id:
          type: string
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes.
          example: '123456789'
        status:
          type: string
          description: >-
            It displays the status of the aadhaar information. Possible values
            are:

            - `VALID`: Successfully fetched Aadhaar details.
          example: VALID
        message:
          type: string
          description: It displays details about the success or failure of the API request.
          example: '123456789'
        care_of:
          type: string
          description: It displays the parent/guardian of the aadhaar card holder.
          example: Jane Doe
        address:
          type: string
          description: It displays the address information as present in the aadhaar card.
          example: Chimli
        dob:
          type: string
          description: It displays the date of birth of the aadhaar card holder.
          example: 01-01-2000.
        email:
          type: string
          description: It displays the email hash of the aadhaar card holder.
          example: v5c64757c746ytvfb687iyjg
        gender:
          type: string
          description: It displays the gender of the aadhaar card holder.
          example: Male
        name:
          type: string
          description: It displays the name of the aadhaar card holder.
          example: John Doe
        year_of_birth:
          type: string
          description: It displays the year of birth of the aadhaar card holder.
          example: '2000'
        mobile_hash:
          type: string
          description: >-
            It displays the unique information about the device's hardware,
            software, and other characteristics.
          example: v5c64757c746ytvfb687iyjg
        photo_link:
          type: string
          description: It displays the URL to the image present in the aadhaar card.
          example: IMAGE_LINK
        share_code:
          type: string
          description: It is the passcode with which we can unzip the xml file
          example: 1234
        xml_file:
          type: string
          description: >-
            It is the link which points to the zip file and contains the xml
            file and has 24 hrs expiry
          example: https://abc.xyz
        split_address:
          type: object
          description: It contains the address information in individual components.
          properties:
            country:
              type: string
              description: >-
                It displays the name of the country as present in the aadhaar
                card.
              example: India
            dist:
              type: string
              description: >-
                It displays the name of the district as present in the aadhaar
                card.
              example: Indore
            house:
              type: string
              description: >-
                It displays the house name/number as present in the aadhaar
                card.
              example: '1234'
            landmark:
              type: string
              description: >-
                It displays the name of the landmark as present in the aadhaar
                card.
              example: Near ABC Hospital.
            pincode:
              type: string
              description: >-
                It displays the PIN code information as present in the aadhaar
                card.
              example: '453551'
            po:
              type: string
              description: It displays the post office nearest to the address present.
              example: Badodiya Khan.
            state:
              type: string
              description: >-
                It displays the name of the state as present in the aadhaar
                card.
              example: Madhya Pradesh
            street:
              type: string
              description: >-
                It displays the name of the street as present in the aadhaar
                card.
              example: ABC street
            subdist:
              type: string
              description: >-
                It displays the name of the sub district as present in the
                aadhaar card.
              example: Sanwer
            vtc:
              type: string
              description: >-
                It displays the village, town, city information as present in
                the aadhaar card.
              example: Ajnod
            locality:
              type: string
              description: It displays the locality as present in the aadhaar card.
              example: Pritam Pura
    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:
    WhenSessionEXPIRED:
      value:
        type: validation_error
        code: verification_failed
        message: Session expired, please generate a new OTP
        error:
          refId: 1
    WhenInvalidAadhaar:
      value:
        type: validation_error
        code: verification_failed
        message: Invalid Aadhaar Card
        error:
          refId: 1
    WhenAadhaarNotLinkedToMobileNumber:
      value:
        type: validation_error
        code: verification_failed
        message: Aadhaar not linked to mobile number
        error:
          refId: 1
    WhenOtpExpired:
      value:
        type: validation_error
        code: verification_failed
        message: Otp expired
        error:
          refId: 1
    WhenOtpEnteredIsOfInvalidFormat:
      value:
        type: validation_error
        code: otp_invalid
        message: Please enter a valid otp.
    WhenOtpIsNotEntered:
      value:
        type: validation_error
        code: otp_empty
        message: Please enter the otp in the request
    WhenEnteredOtpIsInvalid:
      value:
        type: validation_error
        code: verification_failed
        message: OTP entered is invalid
        error: null
        refId: 210
    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: >-
        Client ID. You can find your ID in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).
    XClientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: >-
        Client secret key. You can find your secret key in the [Merchant
        Dashboard](https://telr.cashfree.com/verificationsuite/developers/api-keys).

````