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

      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
      Authorization mandatory This is a base64 encoded string of “clientId:clientSecret”

      Request Attributes


      API Content Type: JSON

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

      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
      responseCode Response code
      status Response status
      message Error reason

      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"}'