A man came to the Prophet ﷺ and asked, "Messenger of Allah, which charity carries the greatest reward?"He replied, "That you give in charity while you are healthy and tight-fisted, fearing poverty and hoping for wealth, and that you do not delay until your soul reaches your throat and you say, 'So much goes to so-and-so, and so much to so-and-so,' when it already belongs to someone else."
جاء رجل إلى النبي ﷺ فقال: يا رسول الله، أي الصدقة أعظم أجرا؟ قال: أن تصدق وأنت صحيح شحيح تخشى الفقر وتأمل الغنى، ولا تمهل حتى إذا بلغت الحلقوم قلت: لفلان كذا، ولفلان كذا، وقد كان لفلان.
Bukhari related it in zakat (1419) and Muslim in zakat (1032), both through Abdul-Wahid, who said, Umara bin Qaqa told us, Abu Zura told us, Abu Hurairah told us, and then he related it. The wording given here is Bukhari's, for Muslim did not present his own wording with this chain, but rather referred back to the wording of the hadith before it.His saying "and those who ask" contains an encouragement, meaning do not turn him away empty-handed, and this has indeed come in the hadith.