Hi etoth,
Thanks for posting in the Community!
There are different ways on recording a customer refund in QuickBooks Online depending on your scenario. Creating a refund receipt can't be linked to an invoice. It is only possible if you entered a refund as an adjustment note or an expense. You may want to consult an accountant to check the best way to record a refund.
Also, you can check on the following articles for your reference:
Record a customer refund in QuickBooks Online
Create and apply adjustment notes or delayed credits in QuickBooks Online
Feel free to drop a comment below if you need further assistance. Have a great day!