The synchronization between QuickBooks and your online data is a complicated piece of work. This is because you can update data on both sides of the synchronization, and the software must figure out what is new, what has been updated - and how that affects the customer/account balances.
A common circumstance where data can appear to be "out of sync" can occur when an invoice is modified inside of QuickBooks and then there are other transactions, such as payments and/or credits during the same synchronization task. This is usually handled just fine when the sync processing performs the cleanup tasks. But there are rare occurrences where the balance was still not updated.
Sometimes, just re-running the synchronization resolves the problem.