The Prophet ﷺ said, "Charity is due upon every Muslim."It was asked, "What if he has nothing to give?"He said, "Then let him work with his hands, benefiting himself and giving in charity."It was asked, "What if he is unable to do that?"He said, "Then let him help someone in distress and need."It was asked, "What if he does not do that?"He said, "Then let him enjoin what is good."It was asked, "What if he does not do that?"He said, "Then let him refrain from harm, for that itself is charity."
أخبرني محمد بن عبد الأعلى قال حدثنا خالد قال حدثنا شعبة قال أخبرني ابن أبي بردة قال سمعت أبي يحدث
عن النبي ﷺ قال على كل مسلم صدقة قيل أرأيت إن لم يجدها قال يعتمل بيده فينفع نفسه ويتصدق قيل أرأيت إن لم يفعل قال يعين ذا الحاجة الملهوف قيل فإن لم يفعل قال يأمر بالخير قيل أرأيت إن لم يفعل قال يمسك عن الشر فإنها صدقة
Bukhari narrated it in Zakat, chapter "On every Muslim there is a duty of charity," etc., hadith no. 1445, and Muslim in Zakat, chapter explaining that the name "charity" applies to every kind of good deed, hadith no. 1008, from the hadith of Shubah with this wording. It is also in Al-Kubra, hadith no. 2318. Khalid is Ibn Harith.