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.

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": "G18FCDTLD5B0SR4",
    "requestTimestamp": {
      "epochMillis": 1482489410000
    },
    "paymentIntegratorAccountId": "SpeedyPaymentsIndia_INR"
  },
  "captureRequestId": "G112YZH4XPDV88J",
  "refundAmount": {
    "amountMicros": "364000000",
    "currencyCode": "INR"
  }
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": {
      "epochMillis": 1482489412366
    }
  },
  "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": {
    object (Amount)
  }
}
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

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

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": {
    object (AsynchronousRefundResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

result

object (AsynchronousRefundResult)

REQUIRED: Result of this asynchronous refund.

AsynchronousRefundResult

Result of this asynchronous refund.

JSON representation
{
  "acknowledged": {
    object (Empty)
  }
}
Fields
acknowledged

object (Empty)

Refund result notification was acknowledged.