If you paid, you could demand it back. If the LL didn't return it then you could sue, and win--I have a case almost exactly like that right now.
In theory, you could also refuse to pay it and then, if the LL didn't agree to lease the apartment, you could also sue.
You could also report the LL to the attorney general's housing division.
In the end, though: are you sure that you want to get into this fight?
Do you want accurate, personalized, legal advice that you can rely on? You will have to hire an attorney, not ask on Avvo. I am not your attorney and am not creating an attorney-client relationship by this post. I am therefore giving only general advice. This advice may not apply to you or your situation; may not take account of all possibilities, and may not match the advice I would give to a client. DO NOT rely on this advice or any other advice on Avvo to make your legal decisions. If you want an answer to a legal question you should retain an attorney who is licensed in your state.