Sahih Muslim Book 10, Hadith Number 3658.

Chapter : Both the buyers and the sellers have the option to withdraw the transaction before leaving the meeting (where the bargain is struck).

Ibn ‘Umar (Allah be pleased with them) reported Allah’s Messenger (may peace be upon him) as saying: When two persons enter into a transaction, each of them has the right to annul it so long as they are not separated and are together (at the place of transaction); or if one gives the other the right (to annul the transaction) But if one gives the other the option, the transaction is made on this condition (i.e. one has the right to annul the transaction), it becomes binding. And if they are separated after they have made the bargain and none of them annulled it, even then the transaction is binding.