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

# Verify IP

> Use this API to fetch the details of the IP passed in the request.

View the [test data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#ip-address) and use the information to trigger the validations. The test data can be used only in the sandbox environment.

<Accordion title="Response codes">
  | Sub code | Status  | Message                                                                                                                                                                                                              | Next action                                                                            |
  | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
  | 200      | SUCCESS | VALID                                                                                                                                                                                                                | -                                                                                      |
  | 400      | ERROR   | x-client-id is missing in the request.                                                                                                                                                                               | Enter all the header information in the request.                                       |
  | 400      | ERROR   | verification\_id already exists.                                                                                                                                                                                     | Enter a unique verification ID to identify the request.                                |
  | 400      | ERROR   | Client secret belongs to test environment                                                                                                                                                                            | Enter the correct environment credentials in the request.                              |
  | 400      | ERROR   | please enter a valid IP address                                                                                                                                                                                      | Enter a valid IP address in the request.                                               |
  | 401      | ERROR   | Invalid clientId and clientSecret combination                                                                                                                                                                        | Ensure you enter valid x-client-id and x-client-secret information in the API request. |
  | 403      | ERROR   | IP not whitelisted your current IP is 106.51.91.104. For IP whitelisting assistance, visit our [IP Whitelisting guide](https://www.cashfree.com/docs/secure-id/get-started/integration/ip-whitelisting-verification) | Whitelist the IP address.                                                              |
  | 404      | ERROR   | unable to find IP details                                                                                                                                                                                            | Enter a valid IP address in the request.                                               |
  | 422      | ERROR   | Insufficient balance to process this request                                                                                                                                                                         | Try again with sufficient balance.                                                     |
  | 500      | ERROR   | something went wrong, please try after some time                                                                                                                                                                     | Try again after some time.                                                             |
</Accordion>


## OpenAPI

````yaml post /ip
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:
  /ip:
    post:
      tags:
        - IP
      summary: Verify IP
      description: >-
        Use this API to fetch the details of the IP passed in the request.


        View the [test
        data](https://www.cashfree.com/docs/api-reference/vrs/data-to-test-integration#ip-address)
        and use the information to trigger the validations. The test data can be
        used only in the sandbox environment.
      operationId: VRSIPVerification
      parameters:
        - $ref: '#/components/parameters/x_cf_signature'
      requestBody:
        $ref: '#/components/requestBodies/IPVerificationRequest'
      responses:
        '200':
          $ref: '#/components/responses/IpVerificationResponse'
        '400':
          $ref: '#/components/responses/Response400IpVerification'
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          $ref: '#/components/responses/Response403'
        '404':
          $ref: '#/components/responses/IpVerification404Response'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500'
      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: ''
  requestBodies:
    IPVerificationRequest:
      description: >-
        Find the request parameters to retrieve location information of an IP
        address.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IpVerificationRequestSchema'
  responses:
    IpVerificationResponse:
      description: IP verified successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/IpVerificationResponseSchema'
    Response400IpVerification:
      description: Validation errors for Ip Verification.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Duplicate Verification Id:
              $ref: '#/components/examples/DuplicateVerificationId'
            Invalid Ip Address:
              $ref: '#/components/examples/InvalidIpAddress'
            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
            x-cf-signature header missing:
              value:
                type: validation_error
                code: authentication_failed
                message: x-cf-signature missing in the request header
    IpVerification404Response:
      description: IP not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v2ErrorResponse404SchemaIpVerification'
    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
    Response500:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: request_failed
                message: Unable to process your request. Try again after some time
  schemas:
    IpVerificationRequestSchema:
      type: object
      example:
        ip_address: 1.0.171.255
        verification_id: testverificationid
      required:
        - ip_address
        - verification_id
      properties:
        ip_address:
          type: string
          description: >-
            It is the IP address that you need to verify which is assigned to a
            device connected to a computer network.
          example: 1.0.171.255
          default: 1.0.171.255
        verification_id:
          type: string
          description: >-
            It is the unique ID you create to identify the verification request.
            The maximum character limit is 50. Only alphanumeric, period (.),
            hyphen (-), and underscore ( _ ) are allowed.
          example: testverificationid
          default: testverificationid
    IpVerificationResponseSchema:
      type: object
      example:
        value:
          reference_id: 1358
          verification_id: testverificationid
          status: VALID
          ip_address: 1.0.171.255
          proxy_type: VPA
          country_code: TH
          country_name: Thailand
          region_name: Phangna
          city_name: Phang Nga
          city_risk_score: '0'
          proxy_type_risk_score: '0'
      properties:
        reference_id:
          type: integer
          description: >-
            It displays the unique ID created by Cashfree Payments for reference
            purposes.

            format: `int64`
          example: 1358
        verification_id:
          type: string
          description: >-
            It displays the unique ID you created to identify the verification
            request.
          example: testverificationid
        status:
          type: string
          description: It displays the status of the IP address.
          example: VALID
        ip_address:
          type: string
          description: It displays the entered IP address.
          example: 1.0.171.255
        proxy_type:
          type: string
          description: >-
            It displays the category or classification of a proxy server based
            on its functionality and how it handles network requests.
          example: VPA
        country_code:
          type: string
          description: >-
            It displays the country code associated with the geographical
            location of the device or network to which the IP address is
            assigned.
          example: TH
        country_name:
          type: string
          description: >-
            It displays the name of the country associated with the geographical
            location of the device or network to which the IP address is
            assigned.
          example: Thailand
        region_name:
          type: string
          description: >-
            It displays the name of the region associated with the geographical
            location of the device or network to which the IP address is
            assigned.
          example: Phangnga
        city_name:
          type: string
          description: >-
            It displays the name of the city associated with the geographical
            location of the device or network to which the IP address is
            assigned.
          example: Phang Nga
        city_risk_score:
          type: string
          description: >-
            It displays the risk score associated with a particular city based
            on factors such as cybersecurity threats, crime rates, or other
            relevant data.
          example: '0'
        proxy_type_risk_score:
          type: string
          description: >-
            It displays the risk score associated with a particular city based
            on factors such as cybersecurity threats, crime rates, or other
            relevant data.
          example: '0'
    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.
    v2ErrorResponse404SchemaIpVerification:
      description: IP not found error response.
      type: object
      example:
        value:
          type: not_found_error
          code: not_found
          message: unable to find IP details
      properties:
        type:
          type: string
          example: not_found_error
        code:
          type: string
          example: not_found
        message:
          type: string
          example: unable to find IP details
  examples:
    DuplicateVerificationId:
      value:
        type: validation_error
        code: duplicate_verification_id
        message: verification_id already exists
    InvalidIpAddress:
      value:
        type: validation_error
        code: invalid_ip_address
        message: please enter a valid IP address
    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).

````