To refund a payment you will just need to call the SDK
refund() method. This requires an authenticated user with the correct refund permissions to be able to perform a refund.
You may also optionally pass in an
amountInCents to refund, in order to refund a portion of the total payment. If
the amount is more than the amount still refundable, or the card that was used for the payment does not support
partial refunds - then an error message will be shown to the user.
If no user has logged in, you WILL be prompted to login using you Yoco account details. If successful, it will continue to the refund flow.