> ## 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.

# Create URL

> Use this API to create a DigiLocker URL to retrieve and verify Aadhaar, PAN, and driving-license information of your customer.



## OpenAPI

````yaml post /digilocker
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:
  /digilocker:
    post:
      tags:
        - Digilocker
      summary: Create URL
      description: >-
        Use this API to create a DigiLocker URL to retrieve and verify Aadhaar,
        PAN, and driving-license information of your customer.
      operationId: VrsDigilockerVerificationCreateUrl
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
      requestBody:
        $ref: '#/components/requestBodies/DigiLockerCreateUrlRequest'
      responses:
        '200':
          $ref: '#/components/responses/DigiLockerVerificationCreateUrlResponse'
        '400':
          $ref: '#/components/responses/Response400DigiLockerVerificationCreateUrl'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '409':
          $ref: '#/components/responses/Response409DigiLockerResponse'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500V2'
      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:
    DigiLockerCreateUrlRequest:
      description: >-
        Find the request parameters to create a DigiLocker URL to retrieve and
        verify aadhaar, pan, driving-license information.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DigiLockerVerificationCreateUrlRequestSchema'
  responses:
    DigiLockerVerificationCreateUrlResponse:
      description: Success response for creating a DigiLocker URL for document verification
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DigiLockerVerificationCreateUrlResponseSchema'
          examples:
            SUCCESS:
              value:
                verification_id: ABC00123
                reference_id: 12345
                url: https://verification-test.cashfree.com/dgl/h7562ci7us0
                status: PENDING
                document_requested:
                  - AADHAAR
                  - PAN
                  - DRIVING_LICENSE
                redirect_url: https://www.cashfree.com
    Response400DigiLockerVerificationCreateUrl:
      description: Validation errors for Create DigiLocker URL 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'
            Document Requested Missing:
              $ref: '#/components/examples/DocumentRequestedMissing'
            Document Requested Empty:
              $ref: '#/components/examples/DocumentRequestedEmpty'
            Invalid Document Requested:
              $ref: '#/components/examples/InvalidDocumentRequested'
            Duplicate Document Requested:
              $ref: '#/components/examples/DuplicateDocumentRequested'
            Invalid Redirection Url without https prefix:
              $ref: '#/components/examples/InvalidRedirectionUrlWithoutHttpsPrefix'
            Invalid Redirection Url with https prefix:
              $ref: '#/components/examples/InvalidRedirectionUrlWithHttpsPrefix'
            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
    Response409DigiLockerResponse:
      description: >-
        Conflict error because of an existing verification ID for DigiLocker
        request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Request with same verification id:
              value:
                type: validation_error
                code: verification_id_value_invalid
                message: >-
                  verification_id already exists, please provide new
                  verification_id
    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
    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
  schemas:
    DigiLockerVerificationCreateUrlRequestSchema:
      type: object
      example:
        verification_id: ABC00123
        document_requested:
          - AADHAAR
          - PAN
          - DRIVING_LICENSE
        redirect_url: https://www.cashfree.com
      required:
        - verification_id
        - document_requested
      properties:
        verification_id:
          description: >-
            It is the unique ID you create to identify the API request. The
            maximum character limit is 50. Alphanumeric, period (.), hyphen (-).
            and underscore ( _ ) are allowed.
          type: string
          example: ABC00123
        document_requested:
          description: It is the list of customer documents required for verification.
          type: array
          items:
            type: string
            enum:
              - AADHAAR
              - PAN
              - DRIVING_LICENSE
          example:
            - AADHAAR
            - PAN
            - DRIVING_LICENSE
        redirect_url:
          description: >-
            It is the URL you need to provide to redirect the user after
            completing the DigiLocker journey. It will contain the
            verification_id, which can be used to check the status of the
            verification.
          type: string
          example: https://www.cashfree.com
    DigiLockerVerificationCreateUrlResponseSchema:
      type: object
      properties:
        verification_id:
          type: string
          description: It displays the unique ID you created to identify this API request.
          example: ABC00123
        reference_id:
          type: integer
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes. format: `int64`
          example: 12345
        url:
          type: string
          description: >-
            It displays the URL received to retrieve and verify aadhaar
            information from DigiLocker.
          example: https://verification-test.cashfree.com/dgl/h7562ci7us0
        status:
          type: string
          description: >-
            It displays the status of the verification request.. Possible values
            are:
              - `PENDING`
          example: PENDING
        document_requested:
          type: array
          description: It displays the list of documents requested for verification.
          items:
            type: string
            enum:
              - AADHAAR
              - PAN
              - DRIVING_LICENSE
          example:
            - AADHAAR
            - PAN
            - DRIVING_LICENSE
        redirect_url:
          type: string
          description: >-
            It displays the URL entered in the request that takes the user to
            after completing the DigiLocker journey.
          example: https://www.cashfree.com
    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.
    DocumentRequestedMissing:
      value:
        type: validation_error
        code: document_requested_missing
        message: document_requested is missing in the request.
    DocumentRequestedEmpty:
      value:
        type: validation_error
        code: invalid_request
        message: Requested Document Type can't be empty
    InvalidDocumentRequested:
      value:
        type: validation_error
        code: invalid_request
        message: Invalid Document Type Submitted
    DuplicateDocumentRequested:
      value:
        type: validation_error
        code: invalid_request
        message: Duplicate Document Type Submitted
    InvalidRedirectionUrlWithoutHttpsPrefix:
      value:
        type: validation_error
        code: redirect_url_value_invalid
        message: redirect_url should start with https.
    InvalidRedirectionUrlWithHttpsPrefix:
      value:
        type: validation_error
        code: redirect_url_value_invalid
        message: redirect_url should be valid url.
    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).

````