Thank them the moment you know the outcome, good or bad. If the referral converted, tell them exactly what happened: it makes them want to refer again.