Sunan Abi Dawud

Hadith #3408

Narrated Ibn 'Umar:The Messenger of Allah (ﷺ) made an agreement with the people of Khaibar to work and cultivate in return for half of the fruits or produce