The Prophet (ﷺ) said, "The buyer and the seller have the option of canceling or confirming the deal unless they separate."
Sahih al-Bukhari Book 34, Hadith 61