Sahih al-Bukhari #4248
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi) 64:283
Narrated `Abdullah:
The Prophet (ﷺ) gave (the land of) Khaibar to the Jews (of Khaibar) on condition that they would work on it and cultivate it and they would have half of its yield.