The Messenger of Allah ﷺ said, "The two parties to a sale each have the option to withdraw as long as they have not parted, and as long as one has not taken from the other what he is content with or desires."
أخبرني محمد بن إسمعيل بن إبراهيم قال حدثنا يزيد قال أنبأنا همام عن قتادة عن الحسن
قال رسول الله ﷺ البيعان بالخيار ما لم يتفرقا ويأخذ أحدهما ما رضي من صاحبه أو هوي