Yes, as long as you follow the rules set out in the Real Estate Settlement Procedures Act (RESPA). These rules come into play any time a real estate broker in a position to refer mortgage business to a lender is paid a “thing of value” by the lender.
A broker may charge a lender a flat fee to place the lender’s banner ads or hyperlinks on the broker’s website, but the payment must be reasonable and commensurate with the value of the service. Some brokers charge a small fee every time someone clicks through to the lender’s website. This appears permissible under RESPA guidelines as long as the fee is minimal and not tied to whether that click results in a loan.
A fee based on a transaction between the lender and a consumer is prohibited by RESPA. For example, it would be a RESPA violation if you received a fee for every click that resulted in an application or closed loan.