POSTSend OTP API
Use Case
This API is used to send the OTP to the user's mobile. Paytm will send OTP to the mobile number passed in the request.
Header
ATTRIBUTE | DESCRIPTION |
---|---|
Authorization string |
This is a base64 encoded string of “clientId:clientSecret” |
x-device-identifier string |
Device Id Please refer below for its sample values. |
autoReadHash string |
Hash of app for auto reading of msgs. |
Query Parameter
ATTRIBUTE | DESCRIPTION |
---|---|
locale string |
This query parameter contains the combination of "language to be used" and "zone". Possible Values: en-IN |
Request Attributes
Content Type : JSON
Body
Attribute | Description |
---|---|
phone string mandatory | Phone number of end user Example: 777777777 |
scopes string mandatory | Name of the resource for which token is required(will be shared by Paytm) Example: [“paytm”, “wallet”] |
Response Attributes
Content Type : JSON
Body
Attribute | Description |
---|---|
status string | Response Status Example: SUCCESS/FAILURE |
message string | Message of the Response Example: OTP sent to phone |
responseCode string | Response code Example: BExxxxxx |
state_token string | Reference state_token to be used while submitting otp Example: 65cb6680-29f6-11e4-aad2-3c970ea8b87f |
Response Codes & Messages
responseCode | status | message |
---|---|---|
BE1400001 | SUCCESS | Success |
434 | FAILURE | Bad request |
BE1423005 | FAILURE | Invalid Authorization |
BE1423006 | FAILURE | Client permission not found |
BE1423012 | FAILURE | Device identifier is missing |
BE1424001 | FAILURE | We have found suspicious activity from this number. Therefore, we have blocked this account. Please raise a request at paytm.com/care to unblock your account. |
BE1425004 | FAILURE | Mobile number is already pending for verification. Please try after 48 hours. |
BE1425005 | FAILURE | Scope not allowed |
BE1425006 | FAILURE | Oops! You have reached an OTP limit, please raise a query at paytm.com/care. |
BE1426003 | FAILURE | There was some issue in processing this request |
BE1426011 | FAILURE | We have found a suspicious activity from this number. Therefore, we have blocked your account. Please raise a request at paytm.com/care. The response code may change. |
Device Id Nomenclature
Device | Suggested Nomenclature | Sample Code |
---|---|---|
App - Android | Android id | Settings.Secure.ANDROID_ID Ref: https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html Example: 8c4afbfab1ae0bd4 |
App - iOS | Vendor Id | UIDevice.current.identifierForVendor?.uuidString Example: CCB300A0-DE1B-4D48-BC7E-599E453B8DD4 |
Web | User Agent | Id associated with cookie Example: 123e4567-e89b-12d3-a456-426614174000 |
Staging
Production
https://accounts-uat.paytm.com/v4/signin/otp/sv1/?locale=en-IN
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl -X POST 'https://accounts-uat.paytm.com/v4/signin/otp/sv1/?locale=en-IN' \
--header 'Authorization: Basic {BASE64_ENCODED_CLIENT_ID_AND_CLIENT_SECRET}' \
--header 'x-device-identifier: Device123' \
--header 'Content-Type: application/json' \
--data '{"phone": "7777777777", "scopes": ["paytm"]}'