“When the Messenger of Allah (ﷺ) conquered Khaibar, he gave it (to its people) in return for half (of its yield).”
Sunan Ibn Majah Book 16, Hadith 34