Here's how it works:
* Pagar is the infinitive of the verb.
* For the ustedes command, we remove the -r from the infinitive and add -en.
Therefore, paguen is the correct command for "pay" when addressing a group of people formally or informally (using "ustedes").