- [HTTP request](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#body.request_body)
  - [JSON representation](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#body.response_body)
- [VerifyOtpResponse](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResponse)
  - [JSON representation](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResponse.SCHEMA_REPRESENTATION)
- [VerifyOtpResultCode](https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResultCode)

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 `https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/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 (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/RequestHeader`) }, "sendOtpRequestId": string, "otp": string } ``` |

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/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](https://developers.google.com/pay/e-wallets-v1/guides/connectivity/protocol-standards#http_status_codes).

| Possible response messages ||
|---|---|
| HTTP 200 Status | ``object (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResponse`)`` |
| HTTP 4XX / 5XX Status | ``object (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ErrorResponse`)`` |
| End of mutually exclusive fields. ||

## VerifyOtpResponse

Response object for the verifyOtp method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/ResponseHeader`) }, "paymentIntegratorVerifyOtpId": string, "result": enum (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#VerifyOtpResultCode`) } ``` |

| Fields ||
|---|---|
| `responseHeader` | ``object (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/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 (`https://developers.google.com/pay/e-wallets-v1/payment-integrator-e-wallets-api/verifyOtp#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. |