Barirah came to Ayesha seeking her help in paying off her writ of emancipation, having not yet paid any portion of it. Ayesha said to her, "Go back to your masters. If they agree that I pay off your writ on the condition that your loyalty (wala) belongs to me, I will do so."Barirah mentioned this to her masters, but they refused, saying, "If she wishes to give it to you as a charitable act while we keep your wala, let her do so."Barirah mentioned this to the Messenger of Allah ﷺ, and he said to her, "Buy her and free her, for wala belongs only to the one who emancipates."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 in the Book of Allah, it is invalid, even if he stipulates it a hundred times."
حدثنا قتيبة حدثنا الليث عن ابن شهاب عن عروة أن
أن بريرة جاءت تستعين عائشة في كتابتها ولم تكن قضت من كتابتها شيئا فقالت لها عائشة ارجعي إلى أهلك فإن أحبوا أن أقضي عنك كتابتك ويكون لي ولاؤك فعلت فذكرت ذلك بريرة لأهلها فأبوا وقالوا إن شاءت أن تحتسب عليك ويكون لنا ولاؤك فلتفعل فذكرت ذلك لرسول الله ﷺ فقال لها رسول الله ﷺ ابتاعي فأعتقي فإنما الولاء لمن أعتق ثم قام رسول الله ﷺ فقال ما بال أقوام يشترطون شروطا ليست في كتاب الله من اشترط شرطا ليس في كتاب الله فليس له وإن اشترط مائة مرة
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the Book of the Mukatab, Chapter on What Conditions Are Permissible for the Mukatab, etc., hadith no. 2561, and Muslim, hadith no. 1504/6, from Qutayba, with the same wording.