If what you have paid is more than the amount of the invoice, the remaining balance will be set as credit and can be used to pay for another invoice or the next invoice. If you want to refund the customer overpayment you can do a credit card refund.
Refer to this article for a refund credit card: Refund a credit card payment in QuickBooks Online.
For your future help, you can also void or refund transactions in QuickBooks Payments: Void or refund transactions in QuickBooks Payments.
Let me know if I can be an additional help or if you have further questions. Have a great day and take care!