The Messenger of Allah ﷺ said, "Hands are of three kinds. The hand of Allah is the highest, the hand of the giver comes next, and the hand of the beggar is the lowest. So give what is beyond your needs, and do not fall short in providing for yourself."
حدثنا عبيدة قال حدثني أبو الزعراء عن أبي الأحوص
قال رسول الله ﷺ الأيدي ثلاثة فيد الله العليا ويد المعطي التي تليها ويد السائل السفلى فأعطين الفضل ولا تعجز عن نفسك
Its isnad is sahih. Ubayda, the teacher of Ahmad, is Ibn Humayd al-Dabbi al-Haddha, a well-known reliable narrator who is frequently mentioned. His hadith is found in Bukhari. Hakim graded the hadith sahih (1/408) by way of Ahmad, and Dhahabi said nothing about it, and Bayhaqi (4/198) and Baghawi in Sharh al-Sunnah (6/114) also transmitted it.