Yes, you can create an invoice to record the sales, @marumir05. I'll lay down the steps to help you match your invoice, refund, and bank transactions in QuickBooks Online.
When matching, the refund process and the sales will be recorded individually. You'll need to deposit the paid invoice into the Undeposited Funds account if it has been paid. Once done, you'll notice a positive amount in the bank feed that has been recognized as income.
I'll show you how to record the transactions separately.
Recording a sale using an Invoice:
- Create an Invoice.
- Receive the payment and put it to the Undeposited Funds.
- Deposit it to the Bank. Note: FollowStep 2 in the article.
- Match it in the Banking page.
To record a Refund transaction:
- Create a Refund transaction. Indicate the product, amount, sales tax, and other charges. Then, enter the Bank account you've used to refund your customer. You can check this sample screenshot:

- Match it in the Banking page. I've added a screenshot for your reference:

Since the money is taken from your account when you match a refund transaction, the bank feeds will show a negative amount. This is why we're unable to combine the refund and the invoice into a single bank transaction. In order to match a refund that has already been sent to your customer, you must wait for the bank feeds to update.
I've added an article for your future reference when you're ready to assess your business income and expenses through QuickBooks Online: Reconcile an account in QuickBooks Online. This also includes how you can undo the process or fix errors.
I'm more than happy to work with you again in managing your transactions. If you need further help with navigating around the product, let me know. I'll get back to you as soon as possible.