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: "When two men engage in a transaction, both have the option to cancel the sale as long as they have not separated, except in the case of a sale with a stipulated option (where the option ends or its period is fixed, its ruling is not related to separation), and both remain together (unless) one of them gives the other the option (at the time of sale). If at the time of sale both give each other the option and they settle the deal on that, then the sale is finalized. And if after making the deal they separate and until that time neither has canceled the sale, then the sale is finalized (and cannot be revoked)."
Hadith Referenceالسنن المأثورة / باب في البيوع / 235
Hadith Takhrijصحیح بخاری، البيوع، باب اذا خير احدهما صاحبه بعد البيع فقد وجب البيع، رقم: 2112، صحیح مسلم، البيوع، باب ثبوت خيار المجلس للمتبايعين، رقم: 1531