This applies to most payments including captured/authorized credit card transactions that have already been settled in the nightly credit card batch processing.
Edit the invoice that was overcharged/overpaid
Add a line item documenting the refund using a negative dollar amount
Select the Refund tab to issue a refund