Method: verifyOtp

Verifies an OTP value was sent by the integrator for the account.

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,
      "minor": 0,
      "revision": 0
    },
    "requestId": "0123434-otp-abc",
    "requestTimestamp": "1502545413098"
  },
  "sendOtpRequestId": "0123434-otp-abc",
  "otp": "7754321"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": "1502545413132"
  },
  "paymentIntegratorVerifyOtpId": "5539163",
  "result": "SUCCESS"
}

HTTP request

POST https://www.integratorhost.example.com/v1/verifyOtp

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "sendOtpRequestId": string,
  "otp": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

sendOtpRequestId

string

REQUIRED: requestId from the sendOtp request that preceded this call.

otp

string

REQUIRED: This is the OTP the user provided, which this call is verifying

Response body

Response object for the verifyOtp method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "paymentIntegratorVerifyOtpId": string,
  "result": enum (VerifyOtpResultCode)
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

paymentIntegratorVerifyOtpId

string

OPTIONAL: Identifier the integrator knows this verify OTP request as. This is integrator generated.

result

enum (VerifyOtpResultCode)

REQUIRED: Result of this request

VerifyOtpResultCode

Result codes for verify OTP request

Enums
UNKNOWN_RESULT Do not ever set this default value!
SUCCESS OTP matched what the integrator sent
OTP_NOT_MATCHED OTP did not match what the integrator sent.
OTP_ALREADY_USED OTP was already used.