It varies by bank.Some will let you and others won't.
You could have your broker write the contract for you and then you are the buyer.The broker gets all the money and gives you a referral fee later.
You could also have another agent represent you and give you back a buyer rebate in your state if it's legal or you could get a referral fee from them.
I know it's stupid to have to do this but the banks sometimes believe since you are getting the property and will benefit then they won't pay you the buyer a commission on top of it.
You might ask yourself why you want the commission anyways as you will be taxed on it.Instead just like a FSBO lower your offer for the difference in commission.One way or another they will not get the benefit from me and the bank will pay for it.
If this is a slamming deal where you will make a ton but the commission is only a few k especially if you have to split with your broker and pay a franchise fee then you don't want to lose the deal over it.