It is narrated from Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "Charity is not lawful for a wealthy person except for five: one who fights in the path of Allah, the collector, one burdened with a debt, a buyer, and a man who has a poor neighbour who receives charity and then gives it as a gift to his neighbour."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الصدقات / 13198