How does the U.S. Overflight Fee system work?
Correct. Some countries charge overflight fees regardless of whether you land or not. In the US, overflight fees are charged per 100 nm. You can find the exact fees for 2017, 2018 and 2019 here. The fees can be paid online, and the FAA is pretty modern when it comes to this; it accepts ACH transfers from a US bank account, Amazon account, Dwolla account, PayPal and Debit or credit card.
The aircraft has to identify itself. The flight plan tells the FAA who you are. They look you up in the registry of the country in which your aircraft appears and send you the bill.
Unpaid fees accrue interest, and can result in the aircraft being denied entry into US airspace or impounded if it does happen to land at a US airport. The FAA can also put liens on the aircraft in the country of registration, which would have to be paid before the aircraft registration changes hands.