Musnad Ahmad 393
It was narrated that Ibn `Umar (رضي الله عنه) said:
The Messenger of Allah   (ﷺ) said: “The two parties to a transaction have the option (of cancelling it) so long as they have not parted or there is a condition which gives the option to cancel.`
حَدَّثَنَا إِسْحَاقُ بْنُ عِيسَى، حَدَّثَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ الْمُتَبَايِعَانِ بِالْخِيَارِ مَا لَمْ يَتَفَرَّقَا أَوْ يَكُونُ الْبَيْعُ خِيَارًا‏.‏