Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:273

˹Charity is˺ for the poor who have been restricted for the cause of Allah, unable to move about in the land. An ignorant ˹person˺ would think them self-sufficient because of their restraint, but you will know them by their ˹characteristic˺ sign. They do not ask people persistently ˹or at all˺. And whatever you spend of good - indeed, Allah is Knowing of it.  

For the poor (this is the predicate of the missing subject, al-sadaqāt, ‘voluntary almsgiving’), who are constrained in the way of God, those who have confined themselves ˹in preparation˺ for the struggle: this was revealed concerning the people of Suffa, consisting in some four hundred of the Emigrants (muhājirūn), set apart ˹from the other Muslims˺ for the study of the Qur’ān and to take part in raids; and they are unable to journey (darban, means safaran) in the land, to engage in commerce and earn their living, since they are fully engaged in the struggle; the ignorant man supposes them, on account of the way they behave, rich because of their abstinence, that is, their refraining from asking for things; but you, the one being addressed, shall know them by their mark, by the signs of their humility and exertion; they do not beg of men, and make urgent demands, importunately, that is to say, they do not beg in the first place, so there is no question of persistence. And whatever good you expend, surely God has knowledge of it, and will requite it accordingly.
القرآن:٢:٢٧٣

لِلْفُقَرَاءِ الَّذِينَ أُحْصِرُوا فِي سَبِيلِ اللَّهِ لَا يَسْتَطِيعُونَ ضَرْبًا فِي الْأَرْضِ يَحْسَبُهُمُ الْجَاهِلُ أَغْنِيَاءَ مِنَ التَّعَفُّفِ تَعْرِفُهُمْ بِسِيمَاهُمْ لَا يَسْأَلُونَ النَّاسَ إِلْحَافًا ۗ وَمَا تُنْفِقُوا مِنْ خَيْرٍ فَإِنَّ اللَّهَ بِهِ عَلِيمٌ  

{للفقراء} خبر مبتدأ محذوف أي الصدقات {الذين أحصروا في سبيل الله} أي حبسوا أنفسهم على الجهاد، نزلت في أهل الصُّفَّةِ وهم أربعمائة من المهاجرين أرصدوا لتعلم القرآن والخروج مع السرايا {لا يستطيعون ضربا} سفرا {في الأرض} للتجارة والمعاش لشغلهم عنه بالجهاد {يحسبهم الجاهل} بحالهم {أغنياء من التعفف} أي لتعففهم عن السؤال وتركه {تعرفهم} يا مخاطب {بسيماهم} علامتهم من التواضع وأثر الجهد {لا يسألون الناس} شيئا فيلحفون {إلحافا} أي لا سؤال لهم أصلا فلا يقع منهم إلحاف وهو الإلحاح {وما تنفقوا من خير فإن الله به عليم} فمجاز عليه.