He came to Umar bin Khattab during his caliphate, and Umar said, "Was I not informed that you take charge of certain public duties for the people, but when you are given the wages for it, you refuse them?"I said, "Yes."He asked, "What do you intend by that?"I said, "I have horses and slaves, and I am well off, so I want my work to be a charity for the Muslims."Umar said, "Do not do that, for I once wanted the very thing you want. The Prophet ﷺ used to give me a gift, and I would say, 'Give it to someone who is more in need of it than I am,' until once he gave me some wealth, and I said, 'Give it to someone more in need of it than I am.' The Prophet ﷺ said, 'Take it, keep it as your property, and give it as charity. Whatever comes to you of this wealth while you are neither craving it nor asking for it, take it. As for what does not, do not let your soul yearn after it.'"
أخبرنا عمرو بن منصور وإسحق بن منصور عن الحكم بن نافع قال أنبأنا شعيب عن الزهري قال أخبرني السائب بن يزيد أن حويطب بن عبد العزى أخبره أن
أنه قدم على عمر بن الخطاب في خلافته فقال عمر ألم أخبر أنك تلي من أعمال الناس أعمالا فإذا أعطيت العمالة كرهتها قال فقلت بلى قال فما تريد إلى ذلك فقلت إن لي أفراسا وأعبدا وأنا بخير وأريد أن يكون عملي صدقة على المسلمين فقال عمر فلا تفعل فإني كنت أردت الذي أردت فكان النبي ﷺ يعطيني العطاء فأقول أعطه أفقر إليه مني حتى أعطاني مرة مالا فقلت أعطه أفقر إليه مني فقال النبي ﷺ خذه فتموله وتصدق به فما جاءك من هذا المال وأنت غير مشرف ولا سائل فخذه وما لا فلا تتبعه نفسك
[Sahih] Bukhari narrated it in Ahkam, chapter on the provision of judges and those employed in it, no. 7163, from Hakam bin Nafi Abu Yaman with this chain, and it is also in Kubra, no. 2388.