getRefunds

suspend fun getRefunds(chargeId: String?, chargeIntentId: String?, perPage: Int?, page: Int?): Pair<RefundResponses.ListRefundsResponse?, NetworkingError?>

Retrieves a paginated list of refunds, optionally filtered by charge or charge intent.

Return

A pair containing a RefundResponses.ListRefundsResponse on success, or a NetworkingError on failure.

Parameters

chargeId

Optional ID of the charge to filter refunds by.

chargeIntentId

Optional ID of the charge intent to filter refunds by.

perPage

Optional number of results to return per page.

page

Optional page number to retrieve.


fun getRefunds(chargeId: String?, chargeIntentId: String?, perPage: Int?, page: Int?, completionHandler: (RefundResponses.ListRefundsResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of refunds and delivers the result via callback.

Parameters

chargeId

Optional ID of the charge to filter refunds by.

chargeIntentId

Optional ID of the charge intent to filter refunds by.

perPage

Optional number of results to return per page.

page

Optional page number to retrieve.

completionHandler

Invoked with a RefundResponses.ListRefundsResponse on success, or a NetworkingError on failure.