• 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

      Use Case


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

      Request Attributes

      API Content format: JSON

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      AuthorizationThis is a base64 encoded string of “clientId:clientSecret”No

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      otpotp sent to userYes
      stateState guid returned in the “send otp” needs to be passed hereYes65cb6680-29f6-11e4-aad2-3c970ea8b87f

      Response Attributes

      Success

      ParameterDescription
      access_tokenaccess token for the user to be used in all further calls
      expiresUNIX expiry time of token
      scopeName of the resource for which token is required
      resourceOwnerIdcustomer id of Paytm

      Error:

      ParameterDescriptionMANDATORY
      responseCodeResponse codeYes
      statusResponse statusYes
      messageError reasonYes

      Response Codes and Messages

      responseCodeStatusMessage
      430Invalid Authorization
      434Bad Request
      403Invalid OTP
      513Invalid Code
      432Login Failed

      Endpoints

      Staging: https://accounts-uat.paytm.com/signin/validate/otp

      Production: https://accounts.paytm.com/signin/validate/otp

      Request CodeResponse JSON
      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":"{otp}","state":"{state}"}'