Send OTP API

Checksum required: No

Use Case


To send OTP to the customer’s mobile number for login into Paytm ecosystem. This OTP is valid for 2 minutes.

Request Attributes:

API Content format: JSON

Head

PARAMETERDESCRIPTIONMANDATORY
Version String (4)Version of the API. Current version is v1Yes
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

PARAMETERDESCRIPTIONMANDATORY
mobileNumber10 digit user mobile NoYes

Response Attributes:

API Content format: JSON

Head

PARAMETERDESCRIPTIONMANDATORY
Version String (2)Version of the API passed in the requestYES
responseTimestamp String (15)UNIX Timestamp of the responseYES

Body

PARAMETERDESCRIPTIONMANDATORY
resultInfo ResultInfoResult info of api requestYes
extraParamsMap Map<String, Object>Map for any Extra informationNo

ResultInfo

PARAMETERDESCRIPTIONMANDATORY
resultStatusString (S(Success), F(Failure), U(Unknown))Status of API callYes
resultCodestringResult code returned to merchant . Max length of result code can be 64Yes
resultMsgstring (Max length can be 256])Result Message contains information about the result.Yes

Send OTP Response Codes and Messages

CODEMESSAGE
01Success
531Oops ! You have reached OTP limit, please raise a query at paytm.com/care.
02Otp sent to phone
431Invalid Mobile,
517Your account is temporarily blocked. Please contact customer care.
408Oops..something is wrong here. If this issue persists, please raise a query at paytm.com/care. Thank you for your patience
202HTTP Response Code other than 200 received in Generate OTP
434Please try again after sometime.
00000900System error

Endpoints

Staging: https://securegw-stage.paytm.in/theia/api/v1/login/sendOtp?mid=<mid>&orderId=<orderId>

Production: https://securegw.paytm.in/theia/api/v1/login/sendOtp?mid=<mid>&orderId=<orderId>

Request CodeResponse JSON
curl -X POST 'https://securegw-stage.paytm.in/login/sendOtp?mid=xxxxxxxxxxxxxxxxxxxx&orderId=xxxxxxxxxxxxxx' --header 'Content-Type: application/json' --data '{"head":{"version":"v1","requestTimestamp":"xxxxxxxxxx","channelId":"WEB","txnToken":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"body":{"mobileNumber":"xxxxxxxxxx"}}'