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

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

| Fields ||
|---|---|
| `requestHeader` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/RequestHeader`)`` **REQUIRED**: Common header for all requests. |
| `authenticateRequestId` | `string` **REQUIRED** : `requestId` from the `authenticate` 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/india-cards-v1/guides/connectivity/protocol-standards#http_status_codes).

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

## VerifyOtpResponse

Response object for the `verifyOtp` method.

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

| Fields ||
|---|---|
| `responseHeader` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/ResponseHeader`)`` **REQUIRED**: Common header for all responses. |
| `paymentIntegratorVerifyOtpId` | `string` **OPTIONAL**: Identifier the payment integrator generates and uses to identify this request. |
| `eci` | `string` **OPTIONAL**: The Electronic Commerce Indicator returned for the request. It should be returned if available. |
| `result` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/verifyOtp#VerifyOtpResultCode`)`` **REQUIRED**: Result of this request |

## VerifyOtpResultCode

Result codes for `verifyOtp`.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "success": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`) }, "otpNotMatched": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`) }, "otpAlreadyUsed": { object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| **REQUIRED** : The result of the `verifyOtp` request. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `success` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`)`` OTP matched what the integrator sent |
| `otpNotMatched` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`)`` OTP did not match what the integrator sent. |
| `otpAlreadyUsed` | ``object (`https://developers.google.com/pay/india-cards-v1/payment-integrator-india-cards-api/Empty`)`` OTP was already used. |
| End of mutually exclusive fields. ||