Method: asynchronousRefund
Stay organized with collections
Save and categorize content based on your preferences.
Refunds a portion of or the entire redirect payment. The requestId
within the header is the idempotency key, which uniquely identifies this transaction.
This initiates a request to refund funds from a redirect payment. The amount refunded can be equal to or smaller than the remaining payment amount on the transaction. Multiple partial refunds are allowed by calling redirect-fop-v1.asynchronousRefund
multiple times with different requestId
values within the header. The final result of the refund is supplied by a call to refundResultNotification
.
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
},
"requestId": "qierozie12345",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "InvisiRedirectPaymentUSA_USD"
},
"captureRequestId": "cmVxdWVzdDE",
"refundAmount": {
"amountMicros": "109900000",
"currencyCode": "INR"
}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"acknowledged": {}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-redirect/asynchronousRefund
Request body
The request body contains data with the following structure:
JSON representation |
{
"requestHeader": {
object (RequestHeader )
},
"captureRequestId": string,
"refundAmount": {
object (Amount )
}
} |
Fields |
requestHeader |
object (RequestHeader )
REQUIRED: Common header for all requests.
|
captureRequestId |
string
REQUIRED: Unique identifier for this redirect payment. This is the requestId field generated by Google when the redirect payment began. For example, if Google called generateRedirectPaymentUrl to generate the Redirect URL, this identifier will be set to the requestId in the requestHeader of that call.
|
refundAmount |
object (Amount )
REQUIRED: The amount of the refund. This will be a positive number, and should always be less-than or equal-to the remaining balance for the completed redirect payment.
|
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 (AsynchronousRefundResponse )
|
HTTP 4XX / 5XX Status |
object (ErrorResponse )
|
AsynchronousRefundResponse
Response object for the refund
method.
AsynchronousRefundResult
Result of this asynchronous refund.
JSON representation |
{
// Union field result can be only one of the following:
"acknowledged": {
object (Empty )
}
// End of list of possible types for union field result .
} |
Fields |
Union field result . REQUIRED: The result of the asynchronous refund. result can be only one of the following: |
acknowledged |
object (Empty )
The refund has been requested and the integrator will do additional steps to determine if the refund was successful. Once the integrator knows the result of the refund, they will inform Google of the result by calling the refundResultNotification API.
|
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-29 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-29 UTC."],[[["\u003cp\u003eInitiates a refund for a redirect payment, allowing for partial or full refunds.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes \u003ccode\u003erequestId\u003c/code\u003e and \u003ccode\u003epaymentIntegratorAccountId\u003c/code\u003e as the idempotency key for unique transaction identification.\u003c/p\u003e\n"],["\u003cp\u003eMultiple partial refunds are supported by using different \u003ccode\u003erequestId\u003c/code\u003e values in subsequent refund requests.\u003c/p\u003e\n"],["\u003cp\u003eFinal refund outcome is determined via the \u003ccode\u003erefundResultNotification\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eThe response indicates acknowledgment of the refund request, with further details provided through a separate notification.\u003c/p\u003e\n"]]],["This describes how to asynchronously refund a redirect payment. A `POST` request is sent to the specified endpoint with a request body containing `requestHeader`, `captureRequestId`, and `refundAmount`. The `requestId` and `paymentIntegratorAccountId` serve as an idempotency key. Multiple partial refunds are possible. The response, if successful (HTTP 200), includes a `responseHeader` and a result of the refund that contains an `acknowledged` field. An `ErrorResponse` is returned for any error.\n"],null,["# Method: asynchronousRefund\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- [AsynchronousRefundResponse](#AsynchronousRefundResponse)\n - [JSON representation](#AsynchronousRefundResponse.SCHEMA_REPRESENTATION)\n- [AsynchronousRefundResult](#AsynchronousRefundResult)\n - [JSON representation](#AsynchronousRefundResult.SCHEMA_REPRESENTATION)\n\nRefunds a portion of or the entire redirect payment. The `requestId` within the header is the idempotency key, which uniquely identifies this transaction.\n\nThis initiates a request to refund funds from a redirect payment. The amount refunded can be equal to or smaller than the remaining payment amount on the transaction. Multiple partial refunds are allowed by calling `redirect-fop-v1.asynchronousRefund` multiple times with different `requestId` values within the header. The final result of the refund is supplied by a call to `refundResultNotification`.\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ErrorResponse).\n\nAn example request looks like: \n\n\n {\n \"requestHeader\": {\n \"protocolVersion\": {\n \"major\": 1\n },\n \"requestId\": \"qierozie12345\",\n \"requestTimestamp\": {\n \"epochMillis\": \"1481899949606\"\n },\n \"paymentIntegratorAccountId\": \"InvisiRedirectPaymentUSA_USD\"\n },\n \"captureRequestId\": \"cmVxdWVzdDE\",\n \"refundAmount\": {\n \"amountMicros\": \"109900000\",\n \"currencyCode\": \"INR\"\n }\n }\n\nAn example response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": {\n \"epochMillis\": \"1481899949611\"\n }\n },\n \"result\": {\n \"acknowledged\": {}\n }\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-redirect/asynchronousRefund`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader) }, \"captureRequestId\": string, \"refundAmount\": { object (/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Amount) } } ``` |\n\n| Fields ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `captureRequestId` | `string` **REQUIRED** : Unique identifier for this redirect payment. This is the `requestId` field generated by Google when the redirect payment began. For example, if Google called `generateRedirectPaymentUrl` to generate the Redirect URL, this identifier will be set to the `requestId` in the `requestHeader` of that call. |\n| `refundAmount` | `object (`[Amount](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Amount)`)` **REQUIRED**: The amount of the refund. This will be a positive number, and should always be less-than or equal-to the remaining balance for the completed redirect payment. |\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-fop-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[AsynchronousRefundResponse](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/asynchronousRefund#AsynchronousRefundResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ErrorResponse)`)` |\n\nAsynchronousRefundResponse\n--------------------------\n\nResponse object for the `refund` method.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ResponseHeader) }, \"result\": { object (/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/asynchronousRefund#AsynchronousRefundResult) } } ``` |\n\n| Fields ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `result` | `object (`[AsynchronousRefundResult](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/asynchronousRefund#AsynchronousRefundResult)`)` **REQUIRED**: Result of this asynchronous refund. |\n\nAsynchronousRefundResult\n------------------------\n\nResult of this asynchronous refund.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `result` can be only one of the following: \"acknowledged\": { object (/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Empty) } // End of list of possible types for union field `result`. } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `result`. **REQUIRED** : The result of the asynchronous refund. `result` can be only one of the following: ||\n| `acknowledged` | `object (`[Empty](/pay/redirect-fop-v1/payment-integrator-redirect-fop-api/Empty)`)` The refund has been requested and the integrator will do additional steps to determine if the refund was successful. Once the integrator knows the result of the refund, they will inform Google of the result by calling the `refundResultNotification` API. |"]]