The Prophet ﷺ said, "The two parties to a sale each have the option to revoke it as long as they have not parted, unless their sale was concluded with a stipulated option."
أخبرنا قتيبة بن سعيد قال حدثنا سفيان عن عبد الله بن دينار
عن النبي ﷺ قال البيعان بالخيار ما لم يتفرقا أو يكون بيعهما عن خيار
[Sahih] Ahmad reported it, 9/2, from Sufyan bin Uyayna, through him. See the previous hadith. It is also in Kubra, no. 6072.