The Messenger of Allah ﷺ said, "The buyer and seller each have the option to cancel the transaction as long as they have not parted, or until one of them says to the other, 'Choose.'"
أخبرنا عمرو بن علي قال حدثنا عبد الأعلى قال حدثنا شعبة عن أيوب عن نافع
أن رسول الله ﷺ قال البيعان بالخيار ما لم يفترقا أو يقول أحدهما للآخر اختر
Bukhari, Sales, chapter "If no time limit is set for the option, is the sale valid?", hadith no. 2109, and Muslim, Sales, chapter on the establishment of the option of session for the two parties to a sale, hadith no. 1531, from the hadith of Ayub Sakhtiyani through this route, and it is also found in al-Kubra, hadith no. 6061.