To refund a customers payment for an order please go to the orders view for the order you wish to refund. If your payment gateway supports an automatic refund there will be a Credit button available.
Click on the Credit button to credit the transaction back to the customers credit card. If your gateway supports this option you may visit the order details page from Orders menu. Search for the order you wish to credit or void and when found select the View link. Just below the credit card details you will see both a void and a credit button along with an amount. You may credit or void the full amount, or perform only a partial credit. If the buttons are not available it is either because your gateway does not support this functionality or the transaction has already been voided or credited.
If the credit/void buttons are not available you may login to your payment gateways virtual terminal and credit or void the transaction from there. This process will vary depending on who your gateway is with but in most cases by doing a search for the original transaction and viewing the details you will be prompted with a button or link to credit or void the selected transaction.
Please note that voids and/or credits are not always possible. Each gateway has individual rules but for the most part a transaction can only be voided if it has not yet settled. And if it has not yet settled it cannot be credited. Depending on how long it has been since the transaction took place your options may be limited and you may receive an error when trying to do one or the other if it is no longer available.