Sahih al-Bukhari 55
Sahih al-Bukhari · Book 2: Belief · What is said regarding the statement: "The reward of deeds depends upon the intention and hoping to get rewards from Allah."
Narrated Abu Mas'ud:
حَدَّثَنَا حَجَّاجُ بْنُ مِنْهَالٍ ، قَالَ حَدَّثَنَا شُعْبَةُ ، قَالَ أَخْبَرَنِي عَدِيُّ بْنُ ثَابِتٍ ، قَالَ سَمِعْتُ عَبْدَ اللَّهِ بْنَ يَزِيدَ ، عَنْ أَبِي مَسْعُودٍ ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " إِذَا أَنْفَقَ الرَّجُلُ عَلَى أَهْلِهِ يَحْتَسِبُهَا فَهُوَ لَهُ صَدَقَةٌ " .
The Prophet (ﷺ) said, "If a man spends on his family (with the intention of having a reward from Allah) sincerely for Allah's sake then it is a (kind of) alms-giving in reward for him.