Ayesha reported,

She informed her that Barirah came seeking her help with her writ of manumission, having not yet paid off any of it.Ayesha said to her, "Go back to your masters. If they agree that I pay off your writ in full and that your loyalty (wala) goes to me, I will do so."Barirah mentioned this to her masters, but they refused, saying, "If she wishes to pay it on your behalf as a charitable act, let her do so, but your loyalty will remain with us."She mentioned this to the Messenger of Allah ﷺ, and he said to her, "Buy her and free her, for loyalty belongs to the one who frees the slave."Then the Messenger of Allah ﷺ stood up and said, "What is the matter with people who stipulate conditions not found in the Book of Allah? Whoever stipulates a condition not found in the Book of Allah, it is invalid, even if he stipulates it a hundred times. The condition of Allah is more rightful and more binding."

Bukhari 2561

Sahih

حدثنا قتيبة حدثنا الليث عن ابن شهاب عن عروة أن

عائشة رضي الله عنها

أخبرته أن بريرة جاءت تستعينها في كتابتها ولم تكن قضت من كتابتها شيئا قالت لها عائشة ارجعي إلى أهلك فإن أحبوا أن أقضي عنك كتابتك ويكون ولاؤك لي فعلت فذكرت ذلك بريرة لأهلها فأبوا وقالوا إن شاءت أن تحتسب عليك فلتفعل ويكون ولاؤك لنا فذكرت ذلك لرسول الله ﷺ فقال لها رسول الله ﷺ ابتاعي فأعتقي فإنما الولاء لمن أعتق قال ثم قام رسول الله ﷺ فقال ما بال أناس يشترطون شروطا ليست في كتاب الله من اشترط شرطا ليس في كتاب الله فليس له وإن شرط مائة مرة شرط الله أحق وأوثق

البخاري 2561صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Mukatab
Chapter
What is permissible of conditions for the mukatab, and whoever stipulates a condition that is not in the Book of Allah
Numbering
Darussalam 2561
Bukhari 2561