Method: payment-integrator-authenticated-card-fop-api.asynchronousRefund

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 payment-integrator-authenticated-card-fop-api.asynchronousRefund multiple times with different requestId within the header. The final result of the refund is supplied by a call to refundResultNotification. The combination of requestId within the header and paymentIntegratorAccountId is the idempotency key, which uniquely identifies this transaction.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1
    },
    "requestId": "G18FCDTLD5B0SR4",
    "requestTimestamp": {
      "epochMillis": 1482489410000
    },
    "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
  },
  "captureRequestId": "G112YZH4XPDV88J",
  "refundAmount": "364000000"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": 1482489412366
    },
    "requestId": "G18FCDTLD5B0SR4"
  },
  "result": "ACKNOWLEDGED"
}

HTTP request

POST https://www.integratordomain.com/v1/payment-integrator-authenticated-card-fop-api/asynchronousRefund

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "captureRequestId": string,
  "refundAmount": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

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

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

Response object for the payment integrator hosted payment-integrator-authenticated-card-fop-api.asynchronousRefund method.

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

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

enum (AsynchronousRefundResultCode)

REQUIRED: The result of the asynchronous refund call.

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.