you will pay after the first upgrade is done, the money will be withdrawn from your storages automatically
Printable View
when you press the "auto-upgrade" button for an upgrade and you didn't have sufficient amount of money, a pop-up window will appear saying either to buy with gems or wait till you have the amount of money needed.
which means that if the first upgrade finishes and you don't have enough money for the next upgrade, it simply wouldn't start