Sahih Muslim , Book 10, Hadith 3656 (USC-MSA)

Ibn 'Umar (Allah be pleased with them) reported Allah's Messenger as saying: Both parties in a business transaction have the right to annul it so long as they have not separated; except in transactions which have been made subject to the right of parties to annul them.

حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ الْبَيِّعَانِ كُلُّ وَاحِدٍ مِنْهُمَا بِالْخِيَارِ عَلَى صَاحِبِهِ مَا لَمْ يَتَفَرَّقَا إِلاَّ بَيْعَ الْخِيَارِ ‏" ‏ ‏.‏

sunnah.com