Sahih al-Bukhari 2563
Ubaid bin Isma'il narrated to us that Abu Usamah told us. He narrated from Hisham (bin Urwah), Hisham from his father, his father from Hazrat Aishah (ra). She used to say that Barirah (ra) came and said: I have made a contract of emancipation (Mukatabah) with my owners for nine (9) Uqiyahs of silver. I have to pay one Uqiyah every year. So please help me. Hazrat Aishah (ra) said: If your owners agree that I count it out and pay it to them all at once and free you, then I will pay it, and your right of inheritance (Wala') will be mine. She went to her owners, but they did not accept this proposal of hers. She said (to Hazrat Aishah (ra)): I put this proposal before them, but they have refused, unless the right of inheritance be theirs. The Messenger of Allah (saw) heard this and asked me, and I related (the whole incident) to him (saw). He (saw) said: “Buy her and free her, and agree with them on the condition of the right of inheritance. The right of inheritance will belong only to the one who has freed.” Hazrat Aishah (ra) used to say: Then the Messenger of Allah (saw) stood up among the people (to deliver an address), and he (saw) praised Allah and extolled Him. Then he (saw) said: “To proceed: what has happened to some men among you that they make conditions that are not in the Book of Allah? Every condition that is not in the Book of Allah is void, even if there be a hundred conditions. The command of Allah alone is more worthy (of being acted upon), and the condition of Allah alone is firmer. What is the state of some of you, that one of them says: ‘Free so-and-so, and the right of inheritance will be mine.’ The right of inheritance will belong only to the one who frees.”
AI-translated by Islam-Today