The Send OTP API is used to:
- Used to send the OTP to verify the merchant’s primary details or bank update details
- Used to generate the user token required for authorization
This is authorised through a client token generated using the client ID and secret.
Note:
The access token is required in the **Bearer **field of the header. To obtain the bearer token,
- Use the scope - send_sign_in_otp in the Get Token API.
For more information on getting the access token, refer to Get Token API.
Environment
Test | https://uat-accounts.payu.in |
Production | https://accounts.payu.in |
Scope | Description | Use Cases |
---|---|---|
user_profile | Allows access to user profile information | • View user details and profile information • Access user identity information • Retrieve account preferences |
create_bank_details | Enables adding new bank account information | • Add new bank accounts to the system • Register new beneficiary accounts • Set up payment destinations |
update_bank_details | Permits modification of existing bank details | • Modify existing bank account information • Update bank account status • Change account verification status |
create_payment_links | Allows generation of new payment links | • Create new payment collection URLs • Generate invoice payment links • Set up recurring payment links |
update_payment_links | Enables modification of existing payment links | • Modify payment link details • Update payment amount or description • Change payment link expiry date |
read_payment_links | Provides read-only access to payment link information | • View payment link details • Track payment link status • Retrieve payment link transaction history |
Sample request
curl --location -g --request POST '{{partner_base_url}}/api/v1/otps/send_otp' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'otp[identity]=9044199921' \
--data-urlencode 'otp[scope]=user_profile' \
--data-urlencode 'otp[channels]=sms' \
--data-urlencode 'otp[type]=SignIn'
Sample request
{
"data": {
"id": "11ea-bf84-27aef522-85a0-02f413145cce",
"type": "notifications",
"attributes": {
"status": "sidekiq_queued",
"send-at": "1594038491",
"status-details": {},
"payload": {
"sms": [
"90xxxxxx21"
]
}
}
}
}
Request Parameters
Additional info for request parameters
Parameter | Description |
---|---|
otp[scope] |
Indicates the purpose of the API. The following APIs use different scopes in this field
|