For most standard home loan and investment loan applications, brokers are paid by the lender after the loan settles.
If a fee ever applies, this would be discussed with you upfront before you proceed. There should be no surprises.