Based on the details you've provided, the income has been overstated, lmancini220.
You are correct that you'll have to undo each deposits. If this is from the Banking page, you can undo multiple deposits at once: Unmatch or move bank transactions after reviewing them.
If these deposits were recorded manually, you'll have to go to each of them and delete manually.
Then, you'll have to go each invoice payments and change the Deposit to field to Undeposited Funds. After correcting the invoice payments, you can already create bank deposits: Record and make bank deposits in QuickBooks Online.
Lastly, you can already match the deposits to the ones in the Banking page: Categorize and match online bank transactions in QuickBooks Online.
Quicker way to do this would depend on an accountant's suggestion. I'd recommend consulting one to ensure we are doing everything correctly.
Let us know if you need anything else. Have a great day!