processRefund

fun processRefund(callback: RefundCallback)

Processes an in-person refund after the refund payment method has been collected.

After processing, the SDK will either call the RefundCallback's onSuccess method with a Refund object, or the onFailure method with a TerminalException object that either includes the failed Refund or the RefundParameters that led to a failure. Your app should inspect the ProcessRefundError to decide how to proceed.

  1. If the refund property is null, the request to Stripe's servers timed out and the refund's status is unknown. We recommend that you retry processRefund with the original RefundParameters.

  2. If the ProcessRefundError has a failure_reason, the refund was declined. We recommend that you take action based on the decline code you received.

Parameters

callback

The callback that will be called when the operation completes.