- [HTTP request](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#body.request_body)
  - [JSON representation](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#body.response_body)
- [CancelFundsReservationResultCode](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultCode)
- [CancelFundsReservationResultNotificationResponse](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultNotificationResponse)
  - [JSON representation](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultNotificationResponse.SCHEMA_REPRESENTATION)
- [CancelFundsReservationResultNotificationResultCode](https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultNotificationResultCode)

Notifies Google of the final result of an [`asynchronousCancelFundsReservation`](https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/asynchronousCancelFundsReservation#google.standardpayments.flows.card_fop_reserve_capture.v1.PaymentIntegratorCardReserveCaptureService.AsynchronousCancelFundsReservation) request.

The `cancelFundsReservationResult` value is idempotent for this `cancelFundsReservationRequestId` and cannot be changed by a subsequent call to this method.

If the reservation of funds has expired or the payment integrator has automatically canceled the reservation, consider it a successful cancel rather than an error. Therefore, use a SUCCESS result code.

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/korea-cards-v1/payment-integrator-korea-cards-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/korea-cards-v1/payment-integrator-korea-cards-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/korea-cards-v1/payment-integrator-korea-cards-api/ErrorResponse).

An example request looks like:


    {
      "requestHeader": {
        "protocolVersion": {
          "major": 1,
          "minor": 0,
          "revision": 0
        },
        "requestId": "473da9f8-92c4-4481-b830-976481d928d2",
        "requestTimestamp": "1481907920000"
      },
      "cancelFundsReservationRequestId": "G1NMPDFX4AW395L",
      "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR",
      "cancelFundsReservationResult": "SUCCESS",
      "rawResult": {
        "scope": "VISA",
        "rawCode": "05"
      }
    }

An example response looks like:


    {
      "responseHeader": {
        "responseTimestamp": "1481907920760"
      },
      "result": "SUCCESS"
    }

### HTTP request

`POST https://vgw.googleapis.com/secure-serving/gsp/google-korea-cards-api/v1/cancelFundsReservationResultNotification/https://developers.google.com/pay/korea-cards-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/korea-cards-v1/payment-integrator-korea-cards-api/RequestHeader) }, "paymentIntegratorAccountId": string, "cancelFundsReservationRequestId": string, "cancelFundsReservationResult": enum (`https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultCode`), "rawResult": { object (https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/CardNetworkResult#RawResult) } } ``` |

| Fields ||
|---|---|
| `requestHeader` | `object (https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/RequestHeader)` **REQUIRED**: Common header for all responses. |
| `paymentIntegratorAccountId` | `string` **REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |
| `cancelFundsReservationRequestId` | `string` **REQUIRED** : A unique identifier for this cancel. This is the `requestId` generated by Google during the `asynchronousCancelFundsReservation` call which this request is associated with. |
| `cancelFundsReservationResult` | ``enum (`https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultCode`)`` **REQUIRED**: The result of this cancel call. |
| `rawResult` | `object (https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/CardNetworkResult#RawResult)` **OPTIONAL**: The raw response code from the network to this call call. This is informational only. |

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

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

## CancelFundsReservationResultCode

Result codes for cancels.

| Enums ||
|---|---|
| `CANCEL_FUNDS_RESERVATION_RESULT_CODE_UNSPECIFIED` | Do not ever set this default value! |
| `SUCCESS` | The cancel completed successfully. |
| `WAIT_FOR_RESERVATION_EXPIRATION` | Due to an unretriable error, the reservation of funds can not be cancelled at this time but will automatically expire at the `reservationExpirationTimestamp` specified on the `ReserveFundsResponse`. |

## CancelFundsReservationResultNotificationResponse

Response object for the Google CancelFundsReservationResultNotificationResponse method.

| JSON representation |
|---|
| ``` { "responseHeader": { object (https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/ResponseHeader) }, "result": enum (`https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultNotificationResultCode`) } ``` |

| Fields ||
|---|---|
| `responseHeader` | `object (https://developers.google.com/pay/korea-cards-v1/payment-integrator-korea-cards-api/ResponseHeader)` **REQUIRED**: Common header for all responses. |
| `result` | ``enum (`https://developers.google.com/pay/korea-cards-v1/google-korea-cards-api/cancelFundsReservationResultNotification#CancelFundsReservationResultNotificationResultCode`)`` **REQUIRED**: Result of this call. |

## CancelFundsReservationResultNotificationResultCode

Result codes for the `cancelFundsReservationResultNotification` method.

| Enums ||
|---|---|
| `CANCEL_FUNDS_RESERVATION_RESULT_NOTIFICATION_RESULT_CODE_UNSPECIFIED` | Do not ever set this default value! |
| `SUCCESS` | Cancel Funds Reservation notification was successfully processed. |