The Messenger of Allah ﷺ said, "Charity is not lawful for a wealthy person, except for five: one who works in collecting it, one fighting in the cause of Allah, a wealthy person who purchases it with his own money, a poor person to whom it was given as charity and who then gifted it to a wealthy person, or one burdened with debt."
قال رسول الله ﷺ: لا تحل الصدقة لغني إلا لخمسة: لعامل عليها، أو لغاز في سبيل الله، أو غني اشتراها بماله، أو فقير تصدق عليه فأهداها لغني، أو غارم.
Abu Dawud (1636), Ibn Majah (1841), Ibn Khuzayma (2374), and Hakim (1/407) all narrated it, each of them from the hadith of Abdul-Razzaq, who said, Maamar informed us, from Zayd bin Aslam, from Ata bin Yasar, from Abu Saeed Khudri, and he related it.As for his saying, "and in the cause of Allah," this refers to jihad in the cause of Allah. The mujahideen are given from zakat what is sufficient for them and for their families, if they have no salary from the state. Likewise the student of religious knowledge, for he too is in the cause of Allah, and there are many hadiths on this subject.As for his saying, "and the wayfarer," this refers to the traveler whose means of travel have been cut off, preventing him from reaching his homeland. He is given from zakat what will get him to his homeland, even if he is wealthy there.