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:30:38

So give the relative his right, as well as the needy and the traveler. That is best for those who desire the countenance of Allah, and it is they who will be the successful.  

And give the relative what is his due, in the way of dutifulness and kindness, and the needy and the wayfarer, the traveller, ˹give˺ voluntary alms — the Prophet’s community must emulate him in this respect. That is better for those who desire God’s Countenance, ˹who desire˺ His reward, in exchange for what they do; those, they are the successful, the winners.
القرآن:٣٠:٣٨

فَآتِ ذَا الْقُرْبَىٰ حَقَّهُ وَالْمِسْكِينَ وَابْنَ السَّبِيلِ ۚ ذَٰلِكَ خَيْرٌ لِلَّذِينَ يُرِيدُونَ وَجْهَ اللَّهِ ۖ وَأُولَٰئِكَ هُمُ الْمُفْلِحُونَ  

{فآت ذا القربى} القرابة {حقه} من البر والصلة {والمسكين وابن السبيل} المسافر من الصدقة، وأمة النبي تبع له في ذلك {ذلك خير للذين يريدون وجه الله} أي ثوابه بما يعملون {وأولئك هم المفلحون} الفائزون.