- [HTTP request](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#body.request_body)
  - [JSON representation](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#body.response_body)
- [RedirectPaymentNotificationRequestResult](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationRequestResult)
  - [JSON representation](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationRequestResult.SCHEMA_REPRESENTATION)
- [RedirectPaymentCompleteNotificationResponse](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentCompleteNotificationResponse)
  - [JSON representation](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentCompleteNotificationResponse.SCHEMA_REPRESENTATION)
- [RedirectPaymentNotificationResult](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationResult)
  - [JSON representation](https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationResult.SCHEMA_REPRESENTATION)

Notify Google of the status of a redirect payment.

If the endpoint encounters an error while processing the request, the endpoint will return HTTP 4xx or 5xx and the HTTP body will either be of type [`ErrorResponse`](https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ErrorResponse) or contain a generic error (e.g. a message similar to "There was an error. Please try again later.").

The generic error is used in situations where an [`ErrorResponse`](https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ErrorResponse) with a clear description could be used to help an attacker understand the payment integrator account identifier of other integrators. In these situations, where either the signing key doesn't match, the payment integrator identifier was not found, or the encryption key was unknown, this method will return a generic error. If the request signature could be verified, additional information regarding the error will be returned in an [`ErrorResponse`](https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ErrorResponse).

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1
        },
        "requestId": "aBcEIzjekl291A",
        "requestTimestamp": {
          "epochMillis": "1481899949606"
        },
        "paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
      },
      "redirectRequestId": "cmVxdWVzdDE",
      "result": {
        "chargeExceedsTransactionLimit": {
          "transactionLimit": {
            "amountMicros": "1000000000000",
            "currencyCode": "INR"
          }
        }
      },
      "formOfPayment": {
        "issuerId": {
          "value": "123ABC"
        }
      }
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": {
          "epochMillis": "1481899949611"
        }
      },
      "result": {
        "accepted": {}
      }
    }

### HTTP request

`POST https://vgw.googleapis.com/gsp/redirect-fop-v1/redirectPaymentCompleteNotification/https://developers.google.com/pay/redirect-fop-v1/reference/glossary#payment_integrator_account_id`

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "requestHeader": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader) }, "redirectRequestId": string, "result": { object (`https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationRequestResult`) }, "formOfPayment": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/FormOfPayment) } } ``` |

| Fields ||
|---|---|
| `requestHeader` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader)` **REQUIRED**: Common header for all requests. |
| `redirectRequestId` | `string` **REQUIRED** : The `requestId` sent in the original/initiating redirect payment request. This is a string that has a max length of 100 characters, and contains only the characters "a-z", "A-Z", "0-9", ":", "-", and "_". |
| `result` | ``object (`https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationRequestResult`)`` **REQUIRED**: Result of this redirect payment. |
| `formOfPayment` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/FormOfPayment)` **REQUIRED** : The form of payment that the user selected for this payment. If the user made no choice or it does not apply, this should be set to `noneChosen`. |

### 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/redirect-fop-v1/guides/connectivity/protocol-standards#http_status_codes).

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

## RedirectPaymentNotificationRequestResult

Result details of the redirect payment.

| 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/redirect-fop-v1/payment-integrator-redirect-fop-api/Empty) }, "chargeExceedsTransactionLimit": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#ChargeExceedsTransactionLimit) }, "chargeUnderLimit": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#ChargeUnderLimit) }, "insufficientFunds": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/InsufficientFunds) }, "accountDoesNotSupportCurrency": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#AccountDoesNotSupportCurrency) }, "userExitedPaymentFlow": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#UserExitedPaymentFlow) }, "riskDeclined": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RiskDeclined) }, "captureRequestExpired": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#CaptureRequestExpired) }, "otpNotMatched": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#OtpNotMatched) }, "declinedByIssuer": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/DeclinedByIssuer) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| **REQUIRED**: The result of the redirect payment. The message specifies if this payment was successful or declined. 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/redirect-fop-v1/payment-integrator-redirect-fop-api/Empty)` Successful redirect payment, deliver the goods. |
| `chargeExceedsTransactionLimit` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#ChargeExceedsTransactionLimit)` This redirect payment request `amount` exceeds per-transaction limit. If this code is used populate the transactionLimit field for user messaging purposes. |
| `chargeUnderLimit` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#ChargeUnderLimit)` This redirect payment request `amount` does not meet the minimum transaction amount. |
| `insufficientFunds` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/InsufficientFunds)` This account does not have sufficient funds to guarantee this redirect payment. |
| `accountDoesNotSupportCurrency` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#AccountDoesNotSupportCurrency)` This account does not support the requested currency. |
| `userExitedPaymentFlow` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#UserExitedPaymentFlow)` User canceled the whole payment attempt. At any point in the payment flow, the user performed an action that canceled the payment. This should be used only when the payment will not complete in the future. |
| `riskDeclined` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RiskDeclined)` The transaction was declined due to a risk check done by the integrator. This does not cause the user's instrument to be closed at Google. |
| `captureRequestExpired` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#CaptureRequestExpired)` It took too long for the integrator to capture the user's funds. Google will treat this decline as a final state, so the integrator must ensure that the user's funds do not get captured later or that the user gets automatically refunded if the capture ended up succeeding. |
| `otpNotMatched` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/getRedirectPaymentStatus#OtpNotMatched)` OTP did not match what the integrator sent. |
| `declinedByIssuer` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/DeclinedByIssuer)` This decline code should never be used in steady-state. It is meant as a temporary catch-all code to use when the integrator encounters an unknown decline code from the underlying issuer of the user's instrument. This result code can be used while the integrator determines a more appropriate result code to use or negotiates the addition of a new result code to this specification. Importantly, this decline code is very much a *real* decline. It is a permanent decline as far as Google is concerned. If the integrator returns this, it is up to them to track down what the issuer's code really means and refund the user if it turns out the code actually meant `SUCCESS`. <br /> > [!NOTE] > **Note:** even after the integrator maps the unknown issuer decline code to an appropriate result code going forward, it is important that they still return `DECLINED_BY_ISSUER` idempotently for any capture request that was originally declined with a `DECLINED_BY_ISSUER` result. > <br /> |
| End of mutually exclusive fields. ||

## RedirectPaymentCompleteNotificationResponse

Response object for the `redirectPaymentCompleteNotification` method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ResponseHeader) }, "result": { object (`https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationResult`) } } ``` |

| Fields ||
|---|---|
| `responseHeader` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ResponseHeader)` **REQUIRED**: Common header for all responses. |
| `result` | ``object (`https://developers.google.com/pay/redirect-fop-v1/google-redirect-fop-api/redirectPaymentCompleteNotification#RedirectPaymentNotificationResult`)`` **REQUIRED**: Contains the result of the request. |

## RedirectPaymentNotificationResult

Details corresponding to the result.

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

| Fields ||
|---|---|
| **REQUIRED**: The result of the request. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `accepted` | `object (https://developers.google.com/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Empty)` The `RedirectPaymentCompleteNotificationRequest` was valid and is now being processed by Google. |
| End of mutually exclusive fields. ||