Normally it is paid by all the people attending the party except the one who is going to leave, because it is for him.
At my work place, people pay according to their ranks; the higher the rank is, the more the person gets paid (thus can afford more then others).
I could be different depending on the place one is working for, but I've never heard someone who is leaving pays for his/her farewell party...