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

      post Validate OTP API

      Use Case


      This API is used to get the access token by validating the OTP of the user

      Header

      ATTRIBUTRE DESCRIPTION MANDATORY
      Authorization This is a base64 encoded string of “clientId:clientSecret” mandatory

      Request Attributes


      API Content Type: JSON

      ATTRIBUTRE DESCRIPTION MANDATORY
      otp string otp sent to user mandatory
      state State guid returned in the “send otp” needs to be passed here
      e.g. 65cb6680-29f6-11e4-aad2-3c970ea8b87f
      mandatory

      Response Attributes


      API Content Type: JSON

      Success Response

      PARAMETER DESCRIPTION
      access_token access token for the user to be used in all further calls
      expires UNIX expiry time of token
      scope Name of the resource for which token is required
      resourceOwnerId customer id of Paytm

      Error Responses

      PARAMETER DESCRIPTION MANDATORY
      responseCode Response code Yes
      status Response status Yes
      message Error reason Yes

      Response Codes and Messages


      responseCodemessage
      430Invalid Authorization
      434Bad Request
      403Invalid OTP
      513Invalid Code
      432Login Failed
      StagingProduction
      REQUESTRESPONSE
      curl -X POST 'https://accounts-uat.paytm.com/signin/validate/otp' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Basic {BASE64_ENCODED_CLIENT_ID_AND_CLIENT_SECRET}' \
      --data '{"otp":"888888","state":"78e8c293-6088-XXXX-XXXX-44b83ffd50c3"}'