The Messenger of Allah (ﷺ) as saying: Each one of the two parties in a business has an option (to annul it) against the other party so long as they have not separated, except in a conditional bargain.
Sunan Abi Dawud Book 24, Hadith 39