Method: cancelFundsReservation
Stay organized with collections
Save and categorize content based on your preferences.
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 requestId
within the header 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
.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type ErrorResponse
.
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.integratorhost.example.com/integrator-base-path/redirect-payment-token-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
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.
Possible response messages |
HTTP 200 Status |
object (CancelFundsReservationResponse )
|
HTTP 4XX / 5XX Status |
object (ErrorResponse )
|
CancelFundsReservationResponse
Response object for the cancel method.
CancelReservedFundsResultCode
Result codes for capture.
Enums |
CANCEL_RESERVED_FUNDS_RESULT_CODE_UNSPECIFIED |
Do not ever set this default value! |
SUCCESS |
Successfully cancelled. |
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecancelFundsReservation\u003c/code\u003e API initiates the cancellation of reserved funds for a transaction, identified by \u003ccode\u003ereserveFundsRequestId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUpon receiving the request, the endpoint should either acknowledge it and subsequently notify the result via \u003ccode\u003ecancelFundsReservationResultNotification\u003c/code\u003e or return an \u003ccode\u003eErrorResponse\u003c/code\u003e in case of errors.\u003c/p\u003e\n"],["\u003cp\u003eThe request body includes the \u003ccode\u003erequestHeader\u003c/code\u003e, \u003ccode\u003epaymentIntegratorAccountId\u003c/code\u003e, and the \u003ccode\u003ereserveFundsRequestId\u003c/code\u003e to identify the specific funds reservation to cancel.\u003c/p\u003e\n"],["\u003cp\u003eThe response body will contain either a \u003ccode\u003eCancelFundsReservationResponse\u003c/code\u003e with the result of the operation or an \u003ccode\u003eErrorResponse\u003c/code\u003e in case of errors during processing.\u003c/p\u003e\n"],["\u003cp\u003eEven if the reservation has expired or been automatically canceled, it should be considered a successful cancellation and an acknowledgement should be sent.\u003c/p\u003e\n"]]],["This process cancels funds reserved by a prior `reserveFunds` call, identified by `reserveFundsRequestId`. A POST request to `cancelFundsReservation` is made with a JSON body containing `requestHeader`, `paymentIntegratorAccountId`, and `reserveFundsRequestId`. The response is either a `CancelFundsReservationResponse` with a `SUCCESS` or an `ErrorResponse`. If the reservation has expired, a successful cancel should be indicated. The final cancel result is sent via `cancelFundsReservationResultNotification`. The request and response headers are required.\n"],null,["# Method: cancelFundsReservation\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [CancelFundsReservationResponse](#CancelFundsReservationResponse)\n - [JSON representation](#CancelFundsReservationResponse.SCHEMA_REPRESENTATION)\n- [CancelReservedFundsResultCode](#CancelReservedFundsResultCode)\n\nInitiates canceling the funds that were reserved by a `reserveFunds` call.\n\nThis 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 `requestId` within the header is the idempotency key and uniquely identifies this transaction.\n\nIf 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`.\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/ErrorResponse).\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1,\n \"minor\": 0,\n \"revision\": 0\n },\n \"requestId\": \"G1NMPDFX4AW395L\",\n \"requestTimestamp\": \"1481907920000\"\n },\n \"paymentIntegratorAccountId\": \"SpeedyPaymentsIndia_INR\",\n \"reserveFundsRequestId\": \"G1MQ0YERJ0Q7LPM\"\n }\n\nAn example response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": \"1481907920760\"\n },\n \"result\": \"SUCCESS\"\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/redirect-payment-token-v1/cancelFundsReservation`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/RequestHeader) }, \"paymentIntegratorAccountId\": string, \"reserveFundsRequestId\": string } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `paymentIntegratorAccountId` | `string` **REQUIRED**: This is the payment integrator account identifier that identifies contractual constraints around this transaction. |\n| `reserveFundsRequestId` | `string` **REQUIRED** : `requestId` of the reserve funds call for this transaction. |\n\n### Response body\n\nThis 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](/pay/redirect-payment-token-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[CancelFundsReservationResponse](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/cancelFundsReservation#CancelFundsReservationResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/ErrorResponse)`)` |\n\nCancelFundsReservationResponse\n------------------------------\n\nResponse object for the cancel method.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/ResponseHeader) }, \"result\": enum (/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/cancelFundsReservation#CancelReservedFundsResultCode) } ``` |\n\n| Fields ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `result` | `enum (`[CancelReservedFundsResultCode](/pay/redirect-payment-token-v1/payment-integrator-redirect-payment-token-api/cancelFundsReservation#CancelReservedFundsResultCode)`)` **REQUIRED**: Result of this cancel. |\n\nCancelReservedFundsResultCode\n-----------------------------\n\nResult codes for capture.\n\n| Enums ||\n|-------------------------------------------------|-------------------------------------|\n| `CANCEL_RESERVED_FUNDS_RESULT_CODE_UNSPECIFIED` | Do not ever set this default value! |\n| `SUCCESS` | Successfully cancelled. |"]]