search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

POSTGenerate OTP API

Use Case

Once user logins through the registered mobile number, generate OTP API call is made to the router domain,to send the OTP to the customer’s mobile number so that the user can access Paytm Wallet

Request Attributes

Content Type : JSON

Head

AttributeDescription
requestTimeStamp
string
optional

EPOCH timestamp of the time at which request is being sent.
Example: 1588402269

tokenType
string
mandatory

Token Type (Eg. TXN_TOKEN)

token
string
mandatory

Transaction Token

Body

AttributeDescription
mobileNumber
string
mandatory

10 digit user mobile No
 

Example: 7777777777

autoReadHash
string
optional

Hash of app for auto reading of msgs

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.

Body

AttributeDescription
resultInfo
object

This parameter gives the information about the result of the API response

resultInfo
+
AttributeDescription
resultStatus
string

This parameter is the result specific to the phase of the transaction mentioned in the txnType field

resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64.

resultMsg
string

This parameter is the result message which contains information about the result.

Response Codes & Messages

resultCoderesultStatusresultMsg
0000SSuccess
501FSystem error
531FOops ! You have reached OTP limit, please raise a query at paytm.com/care.
1012Fparam missing
1011FParameter illegal
827FThis operation is not supported on mid
1006FYour Session has expired.
2014FOrderId in the query param doesn't match with the OrderId send in the request
2013FMid in the query param doesn't match with the Mid send in the request
401FAuthorization Failed
827FThere was some issue in processing this request.
434FBad Request
431FInvalid Mobile
435FUser preference for network OTP is disabled.
433FAccount Blocked
2222FInvalid request body
Staging
Production
https://stage-router.paytm.in/aoa-pay-option-service/v2/otp/generate?mid={mid}&orderId={orderId}copy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl -X POST ‘https://stage-router.paytm.in/aoa-pay-option-service/v2/otp/generate?mid={mid}&orderId={orderId}’\
--header 'Content-Type: application/json' \
--data‘{"head": {"token": "{{txnToken}}","tokenType":"TXN_TOKEN"},"body": {"mobileNumber": "5909031804","autoReadHash": "hash"}}

 

copy icon