RefundsAPI

object RefundsAPI

Provides methods for creating and retrieving refunds against existing charges.

Each operation is available as a suspend function for coroutine-based callers and as a callback-based overload for Java or non-coroutine callers.

Functions

Link copied to clipboard

Creates a new refund for the specified charge intent.

Creates a new refund for the specified charge intent and delivers the result via callback.

Link copied to clipboard
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.

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.

Link copied to clipboard
suspend fun getRefundWith(refundId: String): Pair<Refund?, NetworkingError?>

Retrieves a single refund by its unique identifier.

fun getRefundWith(refundId: String, completionHandler: (Refund?, NetworkingError?) -> Unit)

Retrieves a single refund by its unique identifier and delivers the result via callback.