Page Summary
-
The
verifyOtpAPI is used to verify a user's One-Time Password (OTP) against the one sent by the issuer for authentication. -
The request body includes the
authenticateRequestIdfrom the previousauthenticatecall and the user-provided OTP. -
A successful response indicates a matched OTP, while potential error responses include
otpNotMatchedorotpAlreadyUsed. -
The API uses a standard request header and provides a response header with details like the Electronic Commerce Indicator (ECI) if available.
-
In case of errors during processing, the response will be of type
ErrorResponsewith relevant HTTP status codes.
Verifies the user provided OTP to determine if it matches what the issuer sent. If it matches then the authentication is considered successful.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type
.ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "cmVxdWVzdDE",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
},
"authenticateRequestId": "G112YZH4XPDV88J",
"otp": "123456"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"eci": "07",
"result": {
"success": {}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-authenticated-card-fop-api/verifyOtp
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"requestHeader"
:
{
object (
|
| Fields | |
|---|---|
requestHeader
|
REQUIRED: Common header for all requests. |
authenticateRequestId
|
REQUIRED: |
otp
|
REQUIRED: This is the OTP the user provided, which this call is verifying |
Response body
This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse
, consult the ErrorResponse
object and HTTP status codes documentation
.
| Possible response messages | |
|---|---|
| HTTP 200 Status | |
| HTTP 4XX / 5XX Status | |
VerifyOtpResponse
Response object for the verifyOtp
method.
| JSON representation |
|---|
{ "responseHeader" : { object ( |
| Fields | |
|---|---|
responseHeader
|
REQUIRED: Common header for all responses. |
paymentIntegratorVerifyOtpId
|
OPTIONAL: Identifier the payment integrator generates and uses to identify this request. |
eci
|
OPTIONAL: The Electronic Commerce Indicator returned for the request. It should be returned if available. |
result
|
REQUIRED: Result of this request |
VerifyOtpResultCode
Result codes for verifyOtp
.
| JSON representation |
|---|
{ // Union field |
verify_otp_result_code
. REQUIRED: The result of the verifyOtp
request. verify_otp_result_code
can be only one of the following:success
object (
Empty
)
OTP matched what the integrator sent
otpNotMatched
object (
Empty
)
OTP did not match what the integrator sent.
otpAlreadyUsed
object (
Empty
)
OTP was already used.

