Problem
Your customer mistakenly paid for a different customer's invoice (invoice B) instead of their own invoice (invoice A).
Solution
Go to the invoice (invoice A) for which the payment was intended.
On the invoice screen, click Collect and apply the payment.
Select the exact payment type mistakenly collected.
Edit the amount to the same amount mistakenly applied.
Click the down arrow on the Charge option and select Save without charging.
Go to the invoice (invoice B) to which payment was mistakenly applied.
On invoice B, click Add an adjustment invoice.
Add a negative payment to offset the mistakenly added payment.