The Messenger of Allah ﷺ said, "The buyer and seller have the option to cancel the transaction as long as they have not parted," or he said, "until they part. If they are both truthful and transparent, their transaction will be blessed, but if they conceal anything and lie, the blessing of their transaction will be wiped out."
قال رسول الله ﷺ: البيعان بالخيار ما لم يتفرقا- أو قال: حتى يتفرقا-، فإن صدقا، وبينا بورك لهما في بيعهما، وإن كتما، وكذبا محقت بركة بيعهما.
Bukhari related it in "Sales" (279), and Muslim in "Sales" (1532: 47), both by way of Shubah, from Qatada, from Salih Abu Khalil, from Abdullah bin Harith, from Hakeem bin Hizam, who said, so-and-so, as he mentioned it.Bukhari also related it (2114), and Muslim, by way of Hammam, from Qatada, with the same wording. Bukhari added, Hammam said, "I found in my book, 'he may choose,' three times."