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 URLMethodAuthentication requirements
/v1/api/osvPlatform/generateOtpPOST1. 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 TagDescriptionData type
clientId
Mandatory
Client IDString
clientCode
Mandatory
Client CodeString
signature
Mandatory
Signature CodeString
sid
Mandatory
Session IDString
Authorization: Bearer
Mandatory
Access TokenString
osvPlatformOtpRQ
Mandatory
OTP Request TagObject
userName
Mandatory
Username of the accountString
selectedOption
Mandatory
Selected mode for receiving OTPString
paymentToken
Mandatory
Payment TokenString

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 TagDescriptionData type
osvPlatformOtpRSOTP response tagObject
statusStatus of the responseString
messageResponse messageString
selectedOptionSelected mode of receiving OTPString
moduleOTP generated for the moduleString

Invalid/Failed response

❌ Invalid header information processed successfully

{
  status: "FAILURE",
  errorCode: "Failed_Code",
  message: "Failed_Message"
}

Invalid/failed response description:

JSON TagDescriptionData type
statusStatus of the ProcessString
errorCodeError CodeString
messageResponse MessageString

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 TagDescriptionData type
statusResponse MessageString
errorCodeError CodeString
messageResponse MessageString