Method: verifyOtp
Stay organized with collections
Save and categorize content based on your preferences.
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/integrator-base-path/e-wallets-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
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 |
object (VerifyOtpResponse )
|
HTTP 4XX / 5XX Status |
object (ErrorResponse )
|
VerifyOtpResponse
Response object for the verifyOtp method.
Fields |
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. |
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-28 UTC."],[[["\u003cp\u003eThis endpoint verifies an OTP (One-Time Password) value sent by the integrator for the account.\u003c/p\u003e\n"],["\u003cp\u003eIntegrators must provide the \u003ccode\u003esendOtpRequestId\u003c/code\u003e from the previous \u003ccode\u003esendOtp\u003c/code\u003e request, along with the \u003ccode\u003eotp\u003c/code\u003e entered by the user.\u003c/p\u003e\n"],["\u003cp\u003eThe response will indicate \u003ccode\u003eSUCCESS\u003c/code\u003e if the OTP is valid and matches, and other result codes for invalid or used OTPs.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003erequestHeader\u003c/code\u003e, \u003ccode\u003esendOtpRequestId\u003c/code\u003e, and the \u003ccode\u003eotp\u003c/code\u003e for verification.\u003c/p\u003e\n"],["\u003cp\u003eIn case of errors, the response body will conform to the \u003ccode\u003eErrorResponse\u003c/code\u003e object, providing details about the issue encountered.\u003c/p\u003e\n"]]],["This documentation details how to verify an OTP. A `POST` request is sent to `https://www.integratorhost.example.com/integrator-base-path/e-wallets-v1/verifyOtp`. The request body must include a `requestHeader`, `sendOtpRequestId`, and the `otp` for verification. A successful response (HTTP 200) contains a `responseHeader`, `paymentIntegratorVerifyOtpId`, and the verification `result` (e.g., `SUCCESS`, `OTP_NOT_MATCHED`). Error responses (HTTP 4XX/5XX) return an `ErrorResponse`. The `VerifyOtpResultCode` indicates the outcome.\n"],null,["# Method: verifyOtp\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [VerifyOtpResponse](#VerifyOtpResponse)\n - [JSON representation](#VerifyOtpResponse.SCHEMA_REPRESENTATION)\n- [VerifyOtpResultCode](#VerifyOtpResultCode)\n\nVerifies an OTP value was sent by the integrator for the account.\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/e-wallets-v1/payment-integrator-e-wallets-api/ErrorResponse).\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1,\n \"minor\": 0,\n \"revision\": 0\n },\n \"requestId\": \"0123434-otp-abc\",\n \"requestTimestamp\": \"1502545413098\"\n },\n \"sendOtpRequestId\": \"0123434-otp-abc\",\n \"otp\": \"7754321\"\n }\n\nAn example response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": \"1502545413132\"\n },\n \"paymentIntegratorVerifyOtpId\": \"5539163\",\n \"result\": \"SUCCESS\"\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/e-wallets-v1/verifyOtp`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/e-wallets-v1/payment-integrator-e-wallets-api/RequestHeader) }, \"sendOtpRequestId\": string, \"otp\": string } ``` |\n\n| Fields ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/e-wallets-v1/payment-integrator-e-wallets-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `sendOtpRequestId` | `string` **REQUIRED** : `requestId` from the `sendOtp` request that preceded this call. |\n| `otp` | `string` **REQUIRED**: This is the OTP the user provided, which this call is verifying |\n\n### Response body\n\nThis 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](/pay/e-wallets-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[VerifyOtpResponse](/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/e-wallets-v1/payment-integrator-e-wallets-api/ErrorResponse)`)` |\n\nVerifyOtpResponse\n-----------------\n\nResponse object for the verifyOtp method.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/e-wallets-v1/payment-integrator-e-wallets-api/ResponseHeader) }, \"paymentIntegratorVerifyOtpId\": string, \"result\": enum (/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResultCode) } ``` |\n\n| Fields ||\n|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/e-wallets-v1/payment-integrator-e-wallets-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `paymentIntegratorVerifyOtpId` | `string` **OPTIONAL**: Identifier the integrator knows this verify OTP request as. This is integrator generated. |\n| `result` | `enum (`[VerifyOtpResultCode](/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResultCode)`)` **REQUIRED**: Result of this request |\n\nVerifyOtpResultCode\n-------------------\n\nResult codes for verify OTP request\n\n| Enums ||\n|--------------------|---------------------------------------------|\n| `UNKNOWN_RESULT` | Do not ever set this default value! |\n| `SUCCESS` | OTP matched what the integrator sent |\n| `OTP_NOT_MATCHED` | OTP did not match what the integrator sent. |\n| `OTP_ALREADY_USED` | OTP was already used. |"]]