Yes, voiding an invoice will stop a payment from a customer. That said, we process customer payments by 3 PM PT so you'll have to make sure you void the transaction before 3 PM to cancel their payment. Please check this article to see additional information: Void or refund transactions in QuickBooks Payments.
Please follow the steps below on how you can void the transaction.
Go to the Sales menu and go to the All Sales section.
Find and open the transaction.
Review the transaction. Make sure you need to void or delete it.
If you want to include the void or delete date, add a note to the Memo or Message section.