Method: asynchronousRefund

Refunds a portion of or the entire redirect payment. The combination of requestId within the header and paymentIntegratorAccountId 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

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

Response object for the refund 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
{

  // 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. The result of the refund. result can be only one of the following:
acknowledged

object (Empty)