If a customer has overpaid where payment is more than the invoice amount, it is no different when recording exact payments. You can check the steps on how to record this in QuickBooks Online:
- Select Sales, then Invoices.
- Find the invoice where you need to apply the payment, then select Receive payment.
- Normally the total amount will auto-populate in the Payment field.
- Enter the total amount paid (including overpayment) in the Amount Received field.
- Select Save and Close.
The overpayment will now appear as a credit in the customer's account.
For Refunding customer, you can refer to the following article: Refunding Customers for Overpayments