كتاب عيادة المريض وتشييع الميت والصلاة عليه وحضور دفنه
6  
The Book of Visiting the Sick
(162)
Chapter: Charity on behalf of the Deceased and Praying for him
(162)
- باب الصدقة عن الميت والدعاء له
Riyad as-Salihin 948
'Aishah (May Allah be pleased with her) reported:
A man said to the Prophet (ﷺ): "My mother has died suddenly. I think that if she were able to talk (alive) she would have given in Sadaqah (charity). So, if I give Sadaqah now on her behalf, will she get the reward?" The Messenger of Allah (ﷺ) said, "Yes (she will be rewarded for that)."

[Al-Bukhari and Muslim].

وعن عائشة رضي الله عنها أن رجلاً قال للنبي صلى الله عليه وسلم ‏:‏ إن أمي افتلتت نفسها وأراها لو تكلمت، تصدقت، فهل لها أجر إن تصدقت عنها‏؟‏ قال‏:‏ ‏ "‏نعم‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏
Reference : Riyad as-Salihin 948
In-book reference : Book 6, Hadith 55