fun collectRefundPaymentMethod(refundParams: RefundParameters, callback: Callback): Cancelable

Initiates an in-person refund with a given set of RefundParameters by collecting the payment method that is to be refunded.

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

This method, along with processRefund, allows you to design an in-person refund flow into your app.

If collecting a payment method fails, the onError method of the callback will be called. After resolving the error, you may call collectRefundPaymentMethod again to either try the same card again, or try a different card.

If collecting a payment method succeeds, the onSuccess method of the callback will be called. At that point, you can call processRefund to finish refunding the payment method.

Calling any other SDK methods between collectRefundPaymentMethod and processRefund will result in undefined behavior.

Note that if collectRefundPaymentMethod is canceled, the completion block will be called with a Canceled error.



The RefundParameters object that describes how the refund will be created.


The callback to be called when the command completes.