When people make referrals on pre-agreed commercial terms, the best way to say thank you is to stick to the terms faithfully! On the other hand, when people make referrals to you altruistically or in genuine support of your business... A thank you note or call would suffice. It would also be good practice to let them know along the way how everything went with the referral.