Sahih al-Bukhari 2168
Abdullah bin Yusuf related to us that (Imam) Malik told us. He narrated from Hisham bin Urwah, Hisham from his father, and his father from Hazrat Aishah (ra), that she said: Barirah (ra) came to me and said: “I have had a deed of freedom (Mukatabah) drawn up with my owners, that nine Uqiyahs of silver are to be paid to them, one Uqiyah (to be paid) every year. So help me.” I said: “If your owners agree that I pay them the price in cash (in one lump sum) and that the right to your inheritance (Wala) will be mine, I will do it.” Barirah (ra) went to her owners and told them, but they did not accept this from her. When she came back from them, the Messenger of Allah (saw) was sitting there, and she said: “I put this condition before them, but they have refused, except that the inheritance will be theirs.” The Prophet (saw) heard this, and Hazrat Aishah (ra) told the Prophet (saw) what had happened. He said: “Take her and settle the condition of the inheritance with them, for the right of inheritance belongs to the one who has set free.” Hazrat Aishah (ra) did so. Then the Messenger of Allah (saw) stood among the people and, after praising and glorifying Allah, the Exalted, said: “What is the matter with people that they make conditions that are not in the Book of Allah? Any condition that is not in the Book of Allah is void, even if there are a hundred conditions. The decree of Allah, the Exalted, is true, and the condition of Allah, the Exalted, is most firm. The inheritance belongs only to the one who sets free.”
AI-translated by Islam-Today
Book 73: If somebody imposes conditions in selling against the Islamic Law