Refunds API
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
suspend fun createRefund(request: RefundRequests.CreateRefundRequest): Pair<Refund?, NetworkingError?>
Creates a new refund for the specified charge intent.
fun createRefund(request: RefundRequests.CreateRefundRequest, completionHandler: (Refund?, NetworkingError?) -> Unit)
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
Retrieves a single refund by its unique identifier.
Retrieves a single refund by its unique identifier and delivers the result via callback.