First the player chooses all the tapped creatures they would like to untap this way. Then the entire payment is made at once, then all of those creatures untap at the same time. If the entire payment can’t be paid (because the player chose too many creatures, for example), none of it is paid and none of those creatures untap.