If you inadvertently make a refund using an incorrect payment, the following will allow you to undo the refund.
Go to Banking > Chequebook and enter the card code in the Cust#, then click Run to locate the debtor refund.
Open the record and click Cancel at the bottom left.
You can only cancel the refund if it has not been included in a bank reconciliation.
Further information: