It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "The seller and the buyer have the option (to cancel the transaction) as long as they do not separate, or he said: the sale will remain subject to option as long as they have not separated."
Hadith Referenceمسند احمد / مسند الخلفاء الراشدين / 393