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": 2
    },
    "requestId": "0123434-otp-abc",
    "requestTimestamp": {
      "epochMillis": "1502545413098"
    },
    "paymentIntegratorAccountId": "InvisiCashUSA_USD"
  },
  "sendOtpRequestId": "0123434-otp-abc",
  "otp": "7754321"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": "1502545413132"
    }
  },
  "result": {
    "success": {}
  }
}

HTTP request

POST https://www.integratordomain.com/v2/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

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

Response object for the verifyOtp method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (VerifyOtpResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (VerifyOtpResult)

REQUIRED: Result of this request

VerifyOtpResult

Result codes for verify OTP request

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "otpNotMatched": {
    object (Empty)
  },
  "otpAlreadyUsed": {
    object (Empty)
  },
  "otpLimitReached": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields

Union field result.

result 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.

otpLimitReached

object (Empty)

The user has requested or attempted to verify too many OTPs