Language:
كتاب الزكاة
24
Obligatory Charity Tax (Zakat)
(30)
Chapter: Every Muslim has to give in charity
(30)
باب عَلَى كُلِّ مُسْلِمٍ صَدَقَةٌ، فَمَنْ لَمْ يَجِدْ فَلْيَعْمَلْ بِالْمَعْرُوفِ

Narrated Abu Burda:

from his father from his grandfather that the Prophet (ﷺ) said, "Every Muslim has to give in charity." The people asked, "O Allah's Prophet! If someone has nothing to give, what will he do?" He said, "He should work with his hands and benefit himself and also give in charity (from what he earns)." The people further asked, "If he cannot find even that?" He replied, "He should help the needy who appeal for help." Then the people asked, "If he cannot do that?" He replied, "Then he should perform good deeds and keep away from evil deeds and this will be regarded as charitable deeds."

حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا سَعِيدُ بْنُ أَبِي بُرْدَةَ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏ عَلَى كُلِّ مُسْلِمٍ صَدَقَةٌ ‏"‏‏.‏ فَقَالُوا يَا نَبِيَّ اللَّهِ فَمَنْ لَمْ يَجِدْ قَالَ ‏"‏ يَعْمَلُ بِيَدِهِ فَيَنْفَعُ نَفْسَهُ وَيَتَصَدَّقُ ‏"‏‏.‏ قَالُوا فَإِنْ لَمْ يَجِدْ قَالَ ‏"‏ يُعِينُ ذَا الْحَاجَةِ الْمَلْهُوفَ ‏"‏‏.‏ قَالُوا فَإِنْ لَمْ يَجِدْ‏.‏ قَالَ ‏"‏ فَلْيَعْمَلْ بِالْمَعْرُوفِ، وَلْيُمْسِكْ عَنِ الشَّرِّ فَإِنَّهَا لَهُ صَدَقَةٌ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1445
In-book reference : Book 24, Hadith 48
USC-MSA web (English) reference : Vol. 2, Book 24, Hadith 524
  (deprecated numbering scheme)