(2) باب مَا يَجُوزُ مِنْ شُرُوطِ الْمُكَاتَبِ، وَمَنِ اشْتَرَطَ شَرْطًا لَيْسَ فِي كِتَابِ اللَّهِ
Narrated `Urwa:
That `Aisha told him that Buraira came to seek her help in her writing of emancipation (for a certain sum) and that time she had not paid anything of it. `Aisha said to her, "Go back to your masters, and if they agree that I will pay the amount of your writing of emancipation and get your Wala', I will do so." Buraira informed her masters of that but they refused and said, "If she (i.e. `Aisha) is seeking Allah's reward, then she can do so, but your Wala' will be for us." `Aisha mentioned that to Allah's Apostle who said to her, "Buy and manumit her, as the Wala' is for the liberator." Allah's Messenger (ﷺ) then got up and said, "What about the people who stipulate conditions which are not present in Allah's Laws? Whoever imposes conditions which are not present in Allah's Laws, then those conditions will be invalid, even if he imposed these conditions a hundred times. Allah's conditions (Laws) are the truth and are more solid."
Reference: Sahih al-Bukhari 2561
In-book reference: Book 50, Hadith 2
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 3, Book 46, Hadith 735