Method: asynchronousRefund
Stay organized with collections
Save and categorize content based on your preferences.
Refunds a portion or all of the transaction initiated through asynchronousCaptureFundsReservation
.
This initiates a request to refund funds that were captured. The amount refunded can be equal to or smaller than the remaining captured amount on the transaction. Multiple partial refunds are allowed by calling korea-cards-v1.asynchronousRefund
multiple times with different requestId
within the header. The final result of the refund is supplied by a call to [refundResultNotification
][google.standardpayments.flows.card_fop_async_refund.v1.GoogleCardAsyncRefundService.RefundResultNotification]. The requestId
within the header is the idempotency key, which uniquely identifies this transaction.
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": "G18FCDTLD5B0SR4",
"requestTimestamp": "1482489410000"
},
"paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR",
"captureRequestId": "G112YZH4XPDV88J",
"refundAmount": "364000000"
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": "1482489412366"
},
"result": "ACKNOWLEDGED"
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-korea-cards-api/asynchronousRefund
Request body
The request body contains data with the following structure:
JSON representation |
{
"requestHeader": {
object (RequestHeader )
},
"paymentIntegratorAccountId": string,
"captureRequestId": string,
"refundAmount": string
} |
Fields |
requestHeader |
object (RequestHeader )
REQUIRED: Common header for all requests.
|
paymentIntegratorAccountId |
string
REQUIRED: This is the payment integrator account ID that defines contractual constraints around this transaction.
|
captureRequestId |
string
REQUIRED: A unique identifier for the capture to be refunded. This is the requestId generated by Google during the captureFundsReservation or capture which this request is associated with.
|
refundAmount |
string (Int64Value format)
REQUIRED: The amount of the refund, a positive number of micros of the currency unit specified in the originating message, either the funds reservation or initiating capture.
|
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 payment integrator hosted korea-cards-v1.asynchronousRefund method.
AsynchronousRefundResultCode
Result codes for asynchronousRefund.
Enums |
ASYNCHRONOUS_REFUND_RESULT_CODE_UNSPECIFIED |
Do not ever set this default value! |
ACKNOWLEDGED |
The refund has been requested and the integrator will do additional steps to determine if the capture was successful. Once the integrator knows the result of the refund, they will inform Google of the result by calling the refundNotification API. |
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-17 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-17 UTC."],[[["\u003cp\u003e\u003ccode\u003easynchronousRefund\u003c/code\u003e refunds a portion or all of a captured transaction, allowing for multiple partial refunds.\u003c/p\u003e\n"],["\u003cp\u003eThe final refund result is delivered via a separate \u003ccode\u003erefundResultNotification\u003c/code\u003e call.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires \u003ccode\u003erequestHeader\u003c/code\u003e, \u003ccode\u003epaymentIntegratorAccountId\u003c/code\u003e, \u003ccode\u003ecaptureRequestId\u003c/code\u003e, and \u003ccode\u003erefundAmount\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response indicates whether the refund request was acknowledged and will be processed asynchronously.\u003c/p\u003e\n"],["\u003cp\u003eIntegrators must inform Google of the final refund result using the \u003ccode\u003erefundNotification\u003c/code\u003e API.\u003c/p\u003e\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- [AsynchronousRefundResultCode](#AsynchronousRefundResultCode)\n\nRefunds a portion or all of the transaction initiated through [`asynchronousCaptureFundsReservation`](/pay/korea-cards-v1/payment-integrator-korea-cards-api/asynchronousCaptureFundsReservation#google.standardpayments.flows.card_fop_reserve_capture.v1.PaymentIntegratorCardReserveCaptureService.AsynchronousCaptureFundsReservation).\n\nThis initiates a request to refund funds that were captured. The amount refunded can be equal to or smaller than the remaining captured amount on the transaction. Multiple partial refunds are allowed by calling `korea-cards-v1.asynchronousRefund` multiple times with different `requestId` within the header. The final result of the refund is supplied by a call to \\[`refundResultNotification`\\]\\[google.standardpayments.flows.card_fop_async_refund.v1.GoogleCardAsyncRefundService.RefundResultNotification\\]. The `requestId` within the header is the idempotency key, which uniquely identifies this transaction.\n\nIf the endpoint encounters an error while processing the request, the response body from this endpoint should be of type [`ErrorResponse`](/pay/korea-cards-v1/payment-integrator-korea-cards-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\": \"G18FCDTLD5B0SR4\",\n \"requestTimestamp\": \"1482489410000\"\n },\n \"paymentIntegratorAccountId\": \"SpeedyPaymentsIndia_INR\",\n \"captureRequestId\": \"G112YZH4XPDV88J\",\n \"refundAmount\": \"364000000\"\n }\n\nAn example response looks like: \n\n\n {\n \"responseHeader\": {\n \"responseTimestamp\": \"1482489412366\"\n },\n \"result\": \"ACKNOWLEDGED\"\n }\n\n### HTTP request\n\n`POST https://www.integratorhost.example.com/integrator-base-path/v1/payment-integrator-korea-cards-api/asynchronousRefund`\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"requestHeader\": { object (/pay/korea-cards-v1/payment-integrator-korea-cards-api/RequestHeader) }, \"paymentIntegratorAccountId\": string, \"captureRequestId\": string, \"refundAmount\": string } ``` |\n\n| Fields ||\n|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `requestHeader` | `object (`[RequestHeader](/pay/korea-cards-v1/payment-integrator-korea-cards-api/RequestHeader)`)` **REQUIRED**: Common header for all requests. |\n| `paymentIntegratorAccountId` | `string` **REQUIRED**: This is the payment integrator account ID that defines contractual constraints around this transaction. |\n| `captureRequestId` | `string` **REQUIRED** : A unique identifier for the capture to be refunded. This is the `requestId` generated by Google during the `captureFundsReservation` or `capture` which this request is associated with. |\n| `refundAmount` | `string (`[Int64Value](https://developers.google.com/discovery/v1/type-format)` format)` **REQUIRED**: The amount of the refund, a positive number of micros of the currency unit specified in the originating message, either the funds reservation or initiating capture. |\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/korea-cards-v1/guides/connectivity/protocol-standards#http_status_codes).\n\n| Possible response messages ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| HTTP 200 Status | `object (`[AsynchronousRefundResponse](/pay/korea-cards-v1/payment-integrator-korea-cards-api/asynchronousRefund#AsynchronousRefundResponse)`)` |\n| HTTP 4XX / 5XX Status | `object (`[ErrorResponse](/pay/korea-cards-v1/payment-integrator-korea-cards-api/ErrorResponse)`)` |\n\nAsynchronousRefundResponse\n--------------------------\n\nResponse object for the payment integrator hosted korea-cards-v1.asynchronousRefund method.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"responseHeader\": { object (/pay/korea-cards-v1/payment-integrator-korea-cards-api/ResponseHeader) }, \"result\": enum (/pay/korea-cards-v1/payment-integrator-korea-cards-api/asynchronousRefund#AsynchronousRefundResultCode) } ``` |\n\n| Fields ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `responseHeader` | `object (`[ResponseHeader](/pay/korea-cards-v1/payment-integrator-korea-cards-api/ResponseHeader)`)` **REQUIRED**: Common header for all responses. |\n| `result` | `enum (`[AsynchronousRefundResultCode](/pay/korea-cards-v1/payment-integrator-korea-cards-api/asynchronousRefund#AsynchronousRefundResultCode)`)` **REQUIRED**: The result of the asynchronous refund call. |\n\nAsynchronousRefundResultCode\n----------------------------\n\nResult codes for asynchronousRefund.\n\n| Enums ||\n|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ASYNCHRONOUS_REFUND_RESULT_CODE_UNSPECIFIED` | Do not ever set this default value! |\n| `ACKNOWLEDGED` | The refund has been requested and the integrator will do additional steps to determine if the capture was successful. Once the integrator knows the result of the refund, they will inform Google of the result by calling the `refundNotification` API. |"]]