There are two options to resolve an AP Overpayment:
When you have paid a vendor more than you needed to, you may record the overpayment in AP by creating a credit invoice.
The next time you pay that vendor, you would create an invoice for the item you owe the vendor, but under select items for payment, you would select both the credit and the invoice. The check will print the difference.
If the vendor has already reimbursed you with a check, you must create a GJ transaction of type CR and make a positive entry for the bank with the expense as the offset. In the description you could put—refund of check# … paid twice (or whatever the issue was).