It is narrated from Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) that he said: "Whoever gives a gift (hibah) for the sake of maintaining family ties, or by way of charity, it is binding; and whoever gives a gift with the intention that his aim was only to obtain a (material) return, then if he is not satisfied (with a recompense for his gift), he has more right to that gift of his (that is, he has the right to take it back)." Imam al-Bayhaqi also narrated it in his Sunan with these words, that Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: "Whoever gives a gift to maintain family ties or as charity cannot take it back; but whoever gives a gift with the intention of receiving a return for it remains (free to decide) concerning his gift: if he is not satisfied with a recompense for it, he may take it back." Imam al-Bayhaqi narrated it in his Sunan.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الهبات وفيه عطية الرجل ولده / 2972
Hadith Gradingمحدثین:سكت عنه البوصيري، موقوف؛ إسناده صحيح
Hadith Takhrij«مسدد ويحيى القطان ومالك ثقات؛ داود بن الحصين ثقة إلا في عكرمة (من الحفظ)؛ أبو غطفان بن طريف المري ثقة (من الحفظ)؛ مروان بن الحكم يروي عن عمر (من الحفظ)»
It is narrated from Sayyiduna Umar (may Allah be pleased with him) that there was a man whose nickname was 'Himar' (donkey). He used to present to the Messenger of Allah (peace and blessings be upon him) a skin of ghee and a skin of honey as a gift. Then, when the actual owner of those goods came to him demanding the price, he would bring him to the Messenger of Allah (peace and blessings be upon him) and say: "O Messenger of Allah, give this man the price of his goods." The Messenger of Allah (peace and blessings be upon him) would do nothing more than smile (at his unusual manner) and order that the price be paid, and it would be given to him.
This chain is sahih (authentic).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الهبات وفيه عطية الرجل ولده / 2973