Sahih Muslim Book 10, Hadith Number 3758.

Chapter : If the buyer becomes insolvent and the seller finds the commodity sold to the buyer intact. he can take it back.

Ibn Umar (Allah be pleased with them) reported that Allah’s Messenger (may peace be upon him) contracted with the people of Khaibar the (trees) on the condition that he would have half the produce in fruits and harvest.