Abu Hurairah reported,

The Messenger of Allah ﷺ said, "A man said, 'I will surely give a charity tonight.' So he went out with his charity and placed it in the hand of a thief. In the morning, people were talking and saying, 'Charity was given to a thief last night.' He said, 'O Allah, to You belongs all praise. Charity to a thief! I will surely give a charity tonight.' So he went out with his charity and placed it in the hand of a prostitute. In the morning, people were talking and saying, 'Charity was given to a prostitute last night.' He said, 'O Allah, to You belongs all praise. Charity to a prostitute! I will surely give a charity tonight.' So he went out with his charity and placed it in the hand of a rich man. In the morning, people were talking and saying, 'Charity was given to a rich man.' He said, 'O Allah, to You belongs all praise. Charity to a prostitute, to a thief, and to a rich man!'Then he was visited and told, 'As for your charity, it has been accepted. As for the prostitute, perhaps she will refrain through it from her fornication. As for the thief, perhaps he will refrain through it from his theft. And as for the rich man, perhaps he will take heed and spend from what Allah has given him.'" عز وجل

Nasai 2524

Sahih

أخبرنا عمران بن بكار قال حدثنا علي بن عياش قال حدثنا شعيب قال حدثني أبو الزناد مما حدثه عبد الرحمن الأعرج مما ذكر أنه سمع

أبا هريرة يحدث

به عن رسول الله ﷺ وقال قال رجل لأتصدقن بصدقة فخرج بصدقته فوضعها في يد سارق فأصبحوا يتحدثون تصدق على سارق فقال اللهم لك الحمد على سارق لأتصدقن بصدقة فخرج بصدقته فوضعها في يد زانية فأصبحوا يتحدثون تصدق الليلة على زانية فقال اللهم لك الحمد على زانية لأتصدقن بصدقة فخرج بصدقته فوضعها في يد غني فأصبحوا يتحدثون تصدق على غني قال اللهم لك الحمد على زانية وعلى سارق وعلى غني فأتي فقيل له أما صدقتك فقد تقبلت أما الزانية فلعلها أن تستعف به من زناها ولعل السارق أن يستعف به عن سرقته ولعل الغني أن يعتبر فينفق مما أعطاه الله عز وجل

النسائي 2524صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Zakat
Chapter
If he gives it to a wealthy person unknowingly
Numbering
Darussalam 2524
Nasai 2524