Jami` at-Tirmidhi, Book 7, Hadith 40 (Tirmidhi 656)

Bahz bin Hakim narrated from his father, from his grandfather who said:

"When something was brought to him, the Messenger of Allah would ask: 'Is this charity or a gift?' If they said: 'Charity.' He would not eat it, and if they said, 'A gift' he would eat it."