Thank you for reaching back out to us, bookkeeping23. You have done the first half by recording the refund for the customer's overpayment, such as creating the expense, using the A/R account, and adding the amount correctly! The next step would be to link the refund to the customer's credit or overpayment. Here's how:
Please let me know if you need additional help once doing this. For future reference, you may check out this article: Apply a credit memo, credit, or refund to a customer. The Community and I are here to assist. Have a lovely day!