Generate OTP
Make verified payment requests
Overview
OTP (One-Time Password) is an authentication factor used to process a payment. A user assigns a payment token based on the payment details and encloses it to get the OTP. This OTP is to be included in the requests for processing the payments.
Payment Token
- Payment token is generated at the user-end and is enclosed in the payment request and OTP request
- Before requesting OTP, a signature has to be generated and included in the OTP request
Generate OTP
Endpoint details
Endpoint URL | Method | Authentication requirements |
---|---|---|
/v1/api/osvPlatform/generateOtp | POST | 1. clientId 2. clientCode 3. signature 4. sid 5. Authorization: Bearer |
Sample request
A Generate OTP request in the following format should be posted to the URL https://servicesuat.onesingleview.com/v1/api/osvPlatform/generateOtp.
curl --location --request POST 'https://servicesuat.onesingleview.com/v1/api/osvPlatform/generateOtp' \
--header 'clientId: Enter_Client_ID' \
--header 'clientCode: Enter_Client_Code' \
--header 'signature: Enter_Signature' \
--header 'sid: Enter_Session_ID' \
--header 'Authorization: Bearer Enter_Access_Token' \
--header 'Content-Type: application/json' \
--header 'Cookie: _redisPractice=s%3AZCBGJUQpUkodCfQzjQKS8FVNocn21g2p.jbPbPmfogwh2nDlTq6zjN5PihTC7oFWyrFVWASXiVas' \
--data-raw '{
"osvPlatformOtpRQ": {
"userName":"Enter_Username",
"selectedOption":"Enter_Option_Email_or_SMS",
"paymentToken":"Enter_Payment_Token"
}
}'
Request details
JSON Tag | Description | Data type |
---|---|---|
clientId Mandatory | Client ID | String |
clientCode Mandatory | Client Code | String |
signature Mandatory | Signature Code | String |
sid Mandatory | Session ID | String |
Authorization: Bearer Mandatory | Access Token | String |
osvPlatformOtpRQ Mandatory | OTP Request Tag | Object |
userName Mandatory | Username of the account | String |
selectedOption Mandatory | Selected mode for receiving OTP | String |
paymentToken Mandatory | Payment Token | String |
Sample responses
Valid/Successful response
✔️ Valid header and body request information processed successfully
{
"osvPlatformOtpRS": {
"status": "success",
"message": "OTP Sent",
"selectedOption": "Selected_Option",
"module": "Payments"
}
}
JSON Tag | Description | Data type |
---|---|---|
osvPlatformOtpRS | OTP response tag | Object |
status | Status of the response | String |
message | Response message | String |
selectedOption | Selected mode of receiving OTP | String |
module | OTP generated for the module | String |
Invalid/Failed response
❌ Invalid header information processed successfully
{
status: "FAILURE",
errorCode: "Failed_Code",
message: "Failed_Message"
}
Invalid/failed response description:
JSON Tag | Description | Data type |
---|---|---|
status | Status of the Process | String |
errorCode | Error Code | String |
message | Response Message | String |
Response in case of a Technical error is encountered
⚠️ When the process encounters a technical error
{
status: "TECHERROR",
errorCode: "Error_Code",
message: "Error_Message"
}
Error response description:
JSON Tag | Description | Data type |
---|---|---|
status | Response Message | String |
errorCode | Error Code | String |
message | Response Message | String |
Updated 7 months ago