Allah's Messenger (ﷺ) rented the land of Khaibar to the Jews on the condition that they would work on it and cultivate it and take half of its yield.
Sahih al-Bukhari Book 47, Hadith 16