Method: cancelFundsReservation

Initiates canceling the funds that were reserved by a reserveFunds call.

This cancels the pending transaction by freeing the reserved funds. The reserveFundsRequestId identifies which funds reservation is being canceled. When this is used, there is no money movement from a customer's account for this transaction. The final result of the cancel is supplied by a call to cancelFundsReservationResultNotification. The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key and uniquely identifies this transaction.

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, return an ACKNOWLEDGED response code and call cancelFundsReservationResultNotification.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "G1NMPDFX4AW395L",
    "requestTimestamp": 1481907920000
  },
  "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR",
  "reserveFundsRequestId": "G1MQ0YERJ0Q7LPM"
}

An example response looks like:


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

HTTP request

POST https://www.integratordomain.com/v1/cancelFundsReservation

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "reserveFundsRequestId": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction.

reserveFundsRequestId

string

REQUIRED: requestId of the reserve funds call for this transaction.

Response body

If successful, the response body contains data with the following structure:

Response object for the cancel method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": enum (CancelReservedFundsResultCode)
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

enum (CancelReservedFundsResultCode)

REQUIRED: Result of this cancel.

CancelReservedFundsResultCode

Result codes for capture.

Enums
CANCEL_RESERVED_FUNDS_RESULT_CODE_UNSPECIFIED Do not ever set this default value!
SUCCESS Successfully cancelled.