Sayyiduna Rafi' bin Khadij (may Allah be pleased with him) said: My paternal uncles (may Allah be pleased with them) told me that in the time of the Messenger of Allah (peace and blessings be upon him) they used to rent out land in return for what the land produced, or for something which the owner of the land stipulated as excepted. Then he (peace and blessings be upon him) forbade that. I said to Rafi' (may Allah be pleased with him): How is it for dirhams and dinars? Rafi' (may Allah be pleased with him) said: There is no harm in it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المزارعة / 11720