Jami` at-Tirmidhi 1352
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
الصُّلْحُ جَائِزٌ بَيْنَ الْمُسْلِمِينَ إِلاَّ صُلْحًا حَرَّمَ حَلاَلاً أَوْ أَحَلَّ حَرَامًا وَالْمُسْلِمُونَ عَلَى شُرُوطِهِمْ إِلاَّ شَرْطًا حَرَّمَ حَلاَلاً أَوْ أَحَلَّ حَرَامًا "
Kathir bin 'Amr bin 'Awf Al-Muzani narrated from his father, from his grandfather, that the Messenger of Allah (ﷺ) said:
"Reconciliation is allowed among the Muslims, except for reconciliation that makes the lawful unlawful, or the unlawful lawful. And the Muslims will be held to their conditions, except the conditions that make the lawful unlawful, or the unlawful lawful."
Full reference and source
Jami` at-Tirmidhi 1352 In-book : Book 15, Hadith 32 English translation : Vol. 3, Book 13, Hadith 1352
View source on Sunnah.com (opens in a new tab)