Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:5119Ibn Abū Dhiʾb > Iyās b. Salamah b. al-Akwaʿ from his father

Messenger of Allah ﷺ's said, "If a man and a woman agree (to marry temporarily), their marriage should last for three nights, and if they like to continue, they can do so; and if they want to separate, they can do so." I do not know whether that was only for us or for all the people in general. Abu ʿAbdullah (Al-Bukhari) said: ʿAli made it clear that the Prophet said, "The Mut'a marriage has been cancelled (made unlawful).  

البخاري:٥١١٩وَقَالَ ابْنُ أَبِي ذِئْبٍ حَدَّثَنِي إِيَاسُ بْنُ سَلَمَةَ بْنِ الأَكْوَعِ عَنْ أَبِيهِ

عَنْ رَسُولِ اللَّهِ ﷺ أَيُّمَا رَجُلٍ وَامْرَأَةٍ تَوَافَقَا فَعِشْرَةُ مَا بَيْنَهُمَا ثَلاَثُ لَيَالٍ فَإِنْ أَحَبَّا أَنْ يَتَزَايَدَا أَوْ يَتَتَارَكَا تَتَارَكَا فَمَا أَدْرِي أَشَىْءٌ كَانَ لَنَا خَاصَّةً أَمْ لِلنَّاسِ عَامَّةً قَالَ أَبُو عَبْدِ اللَّهِ وَبَيَّنَهُ عَلِيٌّ عَنِ النَّبِيِّ ﷺ أَنَّهُ مَنْسُوخٌ