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

# Submit OTP

> Verifies the OTP (One-Time Password) sent to the user for verification. 
This endpoint validates the OTP provided by the user against the OTP verification ID.




## OpenAPI

````yaml openapi/ppi/ppi.yaml post /ppi/otp/submit
openapi: 3.0.3
info:
  title: PPI Wallet API
  description: >-
    API for managing PPI (Prepaid Payment Instrument) wallets and sub-wallets,
    including credit and debit operations.
  version: 1.0.0
  contact:
    name: PPI Service Team
    email: support@cashfree.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.cashfree.com
    description: Production server.
  - url: https://sandbox.cashfree.com
    description: Sandbox server.
security:
  - XClientID: []
    XClientSecret: []
tags:
  - name: Users
    description: Operations related to PPI users.
  - name: User KYC
    description: Operations related to user KYC verification.
  - name: Wallets
    description: Operations related to PPI wallets.
  - name: Beneficiaries
    description: Operations related to user beneficiaries.
  - name: Transfers
    description: Operations related to transfers.
paths:
  /ppi/otp/submit:
    post:
      tags:
        - User KYC
      summary: Submit OTP
      description: >
        Verifies the OTP (One-Time Password) sent to the user for verification. 

        This endpoint validates the OTP provided by the user against the OTP
        verification ID.
      operationId: verifyOtp
      parameters:
        - $ref: '#/components/parameters/global_x_api_version'
      requestBody:
        $ref: '#/components/requestBodies/VerifyOtpRequest'
      responses:
        '200':
          $ref: '#/components/responses/VerifyOtpResponse'
        '400':
          description: Bad request - Invalid input parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredErrorResponse'
              examples:
                otp_verification_id_missing:
                  summary: OTP verification ID missing
                  value:
                    code: otp_verification_id_missing
                    type: validation_error
                    message: otp_verification_id parameter is missing
                otp_missing:
                  summary: OTP missing
                  value:
                    code: otp_missing
                    type: validation_error
                    message: otp parameter is missing
                invalid_otp_format:
                  summary: Invalid OTP format
                  value:
                    code: otp_value_invalid
                    type: validation_error
                    message: OTP must be a valid numeric string
                missingClientId:
                  summary: Missing client ID
                  value:
                    message: x-client-id is missing in the request
                    code: x-client-id_missing
                    type: validation_error
                missingClientSecret:
                  summary: Missing client secret
                  value:
                    message: x-client-secret is missing in the request
                    code: x-client-secret_missing
                    type: validation_error
        '401':
          $ref: '#/components/responses/Response401'
        '403':
          description: Forbidden - Access denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredErrorResponse'
              examples:
                ipNotWhitelisted:
                  summary: IP not whitelisted
                  value:
                    code: ip_not_whitelisted
                    type: authentication_error
                    message: Authentication error (IP not whitelisted)
        '404':
          description: Not found - OTP verification ID not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredErrorResponse'
              examples:
                otpVerificationNotFound:
                  summary: OTP verification ID not found
                  value:
                    code: otp_verification_id_not_found
                    type: invalid_request_error
                    message: The specified otp_verification_id does not exist
        '422':
          description: Unprocessable Entity - OTP verification failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredErrorResponse'
              examples:
                invalidOtp:
                  summary: Invalid OTP
                  value:
                    code: otp_invalid
                    type: validation_error
                    message: The provided OTP is incorrect
                otpExpired:
                  summary: OTP expired
                  value:
                    code: otp_expired
                    type: validation_error
                    message: The OTP has expired. Please request a new OTP
                otpAlreadyVerified:
                  summary: OTP already verified
                  value:
                    code: otp_already_verified
                    type: validation_error
                    message: This OTP has already been verified
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructuredErrorResponse'
              examples:
                rateLimitExceeded:
                  summary: Rate limit exceeded
                  value:
                    code: rate_limit_exceeded
                    type: rate_limit_error
                    message: Rate limit exceeded. Please try again after some time
        '500':
          $ref: '#/components/responses/Response500'
components:
  parameters:
    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: '2025-11-01'
        example: '2025-11-01'
      example: '2025-11-01'
  requestBodies:
    VerifyOtpRequest:
      description: Request parameters to submit and verify an OTP.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VerifyOtpRequest'
          examples:
            verifyOtp:
              summary: Verify OTP request
              value:
                otp_verification_id: Test123
                otp: '222113'
  responses:
    VerifyOtpResponse:
      description: Success response for verifying an OTP.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VerifyOtpResponse'
          examples:
            SUCCESS:
              summary: Successful OTP verification
              value:
                otp_verification_id: Test123
                cf_otp_verification_id: '8901234567890123456'
                status: VERIFIED
                user_id: USER827364
    Response401:
      description: Unauthorised - Invalid or missing authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StructuredErrorResponse'
          examples:
            invalidCredentials:
              summary: Invalid client credentials
              value:
                code: authentication_failed
                type: authentication_error
                message: Invalid client ID and client secret combination
    Response500:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StructuredErrorResponse'
          examples:
            internalError:
              summary: Internal server error
              value:
                code: internal_server_error
                type: internal_error
                message: An internal error occurred while processing the request
  schemas:
    StructuredErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: A broad category of the error.
          example: internal_error
        code:
          type: string
          description: A machine-readable error code specific to the issue.
          example: internal_server_error
        message:
          type: string
          description: >-
            A message providing more details about the error, dynamic based on
            the specific issue.
          example: Internal server error
    VerifyOtpRequest:
      type: object
      required:
        - otp_verification_id
        - otp
      properties:
        otp_verification_id:
          type: string
          description: Unique identifier for the OTP verification request.
          example: Test123
        otp:
          type: string
          description: The OTP provided by the user for verification.
          example: '123456'
    VerifyOtpResponse:
      type: object
      properties:
        otp_verification_id:
          type: string
          description: Unique identifier for the OTP verification request.
          example: Test123
        cf_otp_verification_id:
          type: string
          description: >-
            Unique identifier for the OTP verification request, generated by
            Cashfree.
          example: '8901234567890123456'
        status:
          type: string
          description: Status of the OTP verification process.
          example: VERIFIED
          enum:
            - VERIFIED
            - FAILED
        user_id:
          type: string
          description: >-
            Unique identifier for the user, as provided by you during PPI user
            creation.
          example: USER827364
  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/merchants/landing?env=prod).
    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/merchants/landing?env=prod).

````