processRefund
Processes an in-person refund with a given set of RefundParameters.
Some payment methods, like Interac Debit payments, require that in-person payments also be refunded while the cardholder is present. The cardholder must present the Interac card to the card reader; these payments cannot be refunded via the dashboard or the API.
For payment methods that don't require the cardholder be present, see https://docs.stripe.com/terminal/features/refunds.
This method handles the complete in-person refund flow, including collection of the payment method and confirmation of the refund.
If processing a refund fails, the onError method of the callback will be called. Your app should inspect the TerminalException to decide how to proceed.
If processing a refund succeeds, the onSuccess method of the callback will be called with a Refund object.
Note that if the process is canceled, the completion block will be called with a Canceled error.
Return
A Cancelable that allows the operation to be canceled when the SDK is not waiting for a network response.
Parameters
The RefundParameters object that describes how the refund will be created.
An optional CollectRefundConfiguration to configure per-refund overrides.
The callback to be called when the command completes.