pay (for something) in advance
To make a payment before one collects or receives the thing being purchased. In this usage, a noun or pronoun can be used after "pay" to specify who is being paid. You'll have to pay them in advance for the tickets. You can reserve the new computer online, and you don't have to pay for it in advance. I hope you didn't pay him for the work in advance.
pay in advance
to pay (for something) before it is received or delivered. I want to make a special order. Will I have to pay in advance? Yes, please pay in advance.