The following text was adapted from a QuickBooks Community page.
You will record a vendor credit and encode it such that it hits the same expense account of the original purchase. Then, enter a bank deposit from the refund check or bank credit and link both transactions using Pay Bills.
First off, enter a vendor credit. Here's how:
Click the + New button, then select Vendor credit.
Choose the vendor from the drop-down.
Select the Category details or Item details to match the original expense.
Hit Save and close.
Then, record a bank deposit to the refund check.
Click the + New button and choose Bank Deposit.
Select the appropriate bank account where you got the refund.
In the Add funds to this deposit section, fill out the following fields.
Received from: Select the vendor who gave you a refund.
Account: Select Accounts Payable. Important: You need to pick Accounts Payable so you can tie the refund to the vendor credit.
Payment method: Enter the method your vendor used to refund you.
Amount: Enter the amount of your refund.
Click Save and close.
You can now link the bank deposit to the vendor credit using Pay Bills.
Click the + New button, then select Pay Bills.
Choose the bank account to match the deposit created above.
Check the checkbox beside the vendor's entry in the list. You’ll see the amount of the vendor credit in the Credit Applied field. The Total payment should be $0.00.
Hit Save and close.