• Getting Started
    • Website Integration
      Mobile Integration (Android/IOS)
      Enterprise Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Webhooks
      Testing
      Refunds
      Guides
      Other Processes

      Validate OTP API

      Checksum required: No

      Use Case


      To validate the OTP entered by user to complete authentication for login into Paytm ecosystem

      Request Attributes

      API Content format: JSON

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      version String (4)Version of the API. Current version is v1.No
      requestTimestamp String (15)UNIX timestamp of the time request is being sentNo
      channelId String (3)For websites, the value is WEB. For Mobile websites/App, the value is WAPYes
      txnToken String (64)Provided in response of Create Subscription/ Initiate Transaction APIYes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      otp String6 digit OTP entered by the userYes

      Response Attributes

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      version String (2)Version of the API passed in the request.No
      responseTimestamp String (15)UNIX Timestamp of the responseYes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      isAuthenticated BooleanLogin successful or failedYes
      resultInfo ResultInfoResult info of API callYes

      ResultInfo

      ATTRIBUTEDESCRIPTIONMANDATORY
      resultCodeStringResult code returned to merchant . Max length of result code can be 64Yes
      resultStatusStringStatus of API call
      (S:Success, F:Failure, U:Unknown)
      Yes
      resultMsgString(256)Result Message contains information about the result.Yes

      Response Codes and Messages

      resultCoderesultStatusresultMsg
      01SSuccess
      403FInvalid OTP entered.
      513FInvalid Code,
      708FOops ! You have reached OTP limit, please raise a query at paytm.com/care.
      434FOops ! You have reached OTP limit, please raise a query at paytm.com/care.
      00000900USystem Error

      Endpoints

      Staging: https://securegw-stage.paytm.in/login/validateOtp?mid={mid}&orderId={order-id}

      Production: https://securegw.paytm.in/login/validateOtp?mid={mid}&orderId={order-id}

      Request CodeResponse JSON
      curl -X POST 'https://securegw-stage.paytm.in/login/validateOtp?mid={mid}&orderId={order-id}' --header 'Content-Type: application/json' --data '{"head":{"txnToken":"{transaction-token}"},"body":{"otp":"{otp}"}}'