The Messenger of Allah ﷺ said, "The buyer and seller each have the option to cancel the transaction as long as they have not parted."
أن رسول الله ﷺ قال: البيعان بالخيار مالم يتفرقا.
No references are available.
It was narrated by Abu Dawud (3457), Ibn Majah (2182), and Ahmad (19813), all of them from the hadith of Hammad bin Zayd, from Jameel bin Murra, from Abu Wadi, from Abu Barza Aslami, who related it.Abu Dawud mentioned a story, saying, "We went out on a military expedition of ours, and we stopped at a place. A companion of ours sold a horse for a slave boy, then the two of them stayed for the rest of that day and night. When they woke up the next morning, it was time to set off, so he went to his horse to saddle it, but then he regretted the deal. He went to the man and demanded the sale back, but the man refused to give it back to him. So he said, 'Let Abu Barza, the companion of the Prophet ﷺ, judge between us.' The two of them went to Abu Barza, who was at the edge of the camp, and told him this story. He said, 'Are you both willing for me to judge between you according to the judgment of the Messenger of Allah ﷺ?'" and he went on to relate the hadith.Its chain of transmission is sahih. Abu Wadi's name was Abbad bin Nusayb, and Ibn Main and others confirmed his reliability.