Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:456ʿAlī b. ʿAbdullāh > Sufyān > Yaḥyá > ʿAmrah > ʿĀʾishah

Barirah came to seek my help regarding her manumission (freedom). I told herself you like I would pay your price to your masters but your Wala' (allegiance) would be for me." Her masters said, "If you like, you can pay what remains (of the price of her manumission), (Sufyan the sub-narrator once said), or if you like you can manumit her, but her (inheritance) Al-Wala would be for us. "When Messenger of Allah ﷺ came, I spoke to him about it. He said, "Buy her and manumit her. No doubt Al-Wala' is for the manumitted." Then Messenger of Allah ﷺ stood on the pulpit (or Messenger of Allah ﷺ ascended the pulpit as Sufyan once said), and said, "What about some people who impose conditions which are not present in Allah's Book (Laws)? Whoever imposes conditions which are not in Allah's Book (Laws), his conditions will be invalid even if he imposed them a hundred times."  

البخاري:٤٥٦حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ قَالَ حَدَّثَنَا سُفْيَانُ عَنْ يَحْيَى عَنْ عَمْرَةَ عَنْ عَائِشَةَ قَالَتْ أَتَتْهَا بَرِيرَةُ تَسْأَلُهَا فِي كِتَابَتِهَا فَقَالَتْ

إِنْ شِئْتِ أَعْطَيْتُ أَهْلَكِ وَيَكُونُ الْوَلاَءُ لِي وَقَالَ أَهْلُهَا إِنْ شِئْتِ أَعْطَيْتِهَا مَا بَقِيَ وَقَالَ سُفْيَانُ مَرَّةً إِنْ شِئْتِ أَعْتَقْتِهَا وَيَكُونُ الْوَلاَءُ لَنَا فَلَمَّا جَاءَ رَسُولُ اللَّهِ ﷺ ذَكَّرَتْهُ ذَلِكَ فَقَالَ ابْتَاعِيهَا فَأَعْتِقِيهَا فَإِنَّ الْوَلاَءَ لِمَنْ أَعْتَقَ ثُمَّ قَامَ رَسُولُ اللَّهِ ﷺ عَلَى الْمِنْبَرِ وَقَالَ سُفْيَانُ مَرَّةً فَصَعِدَ رَسُولُ اللَّهِ ﷺ عَلَى الْمِنْبَرِ فَقَالَ مَا بَالُ أَقْوَامٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتْ فِي كِتَابِ اللَّهِ مَنِ اشْتَرَطَ شَرْطًا لَيْسَ فِي كِتَابِ اللَّهِ فَلَيْسَ لَهُ وَإِنِ اشْتَرَطَ مِائَةَ مَرَّةٍ قَالَ عَلِيٌّ قَالَ يَحْيَى وَعَبْدُ الْوَهَّابِ عَنْ يَحْيَى عَنْ عَمْرَةَ وَقَالَ جَعْفَرُ بْنُ عَوْنٍ عَنْ يَحْيَى قَالَ سَمِعْتُ عَمْرَةَ قَالَتْ سَمِعْتُ عَائِشَةَ رَوَاهُ مَالِكٌ عَنْ يَحْيَى عَنْ عَمْرَةَ أَنَّ بَرِيرَةَ وَلَمْ يَذْكُرْ صَعِدَ الْمِنْبَرَ  


See similar narrations below:

Collected by Bukhārī
bukhari:2735ʿAlī b. ʿAbdullāh > Sufyān > Yaḥyá > ʿAmrah > ʿĀʾishah

Aisha said that Barirah came to seek her help in the writing of her emancipation. ʿAisha said to her, "If you wish, I will pay your masters (your price) and the wala' will be for me." When Messenger of Allah ﷺ came, she told him about it. The Prophet ﷺ said to her, "Buy her (i.e. Barirah) and manumit (free) her, for the Wala is for the one who manumits." Then Messenger of Allah ﷺ ascended the pulpit and said, "What about those people who stipulate conditions which are not in Allah's Laws? Whoever stipulates such conditions as are not in Allah's Laws, then those conditions are invalid even if he stipulated a hundred such conditions."  

البخاري:٢٧٣٥حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ حَدَّثَنَا سُفْيَانُ عَنْ يَحْيَى عَنْ عَمْرَةَ عَنْ عَائِشَةَ ؓ قَالَتْ أَتَتْهَا بَرِيرَةُ تَسْأَلُهَا فِي كِتَابَتِهَا فَقَالَتْ

إِنْ شِئْتِ أَعْطَيْتُ أَهْلَكِ وَيَكُونُ الْوَلاَءُ لِي فَلَمَّا جَاءَ رَسُولُ اللَّهِ ﷺ ذَكَّرْتُهُ ذَلِكَ قَالَ النَّبِيُّ ﷺ ابْتَاعِيهَا فَأَعْتِقِيهَا فَإِنَّمَا الْوَلاَءُ لِمَنْ أَعْتَقَ ثُمَّ قَامَ رَسُولُ اللَّهِ ﷺ عَلَى الْمِنْبَرِ فَقَالَ مَا بَالُ أَقْوَامٍ يَشْتَرِطُونَ شُرُوطًا لَيْسَتْ فِي كِتَابِ اللَّهِ مَنِ اشْتَرَطَ شَرْطًا لَيْسَ فِي كِتَابِ اللَّهِ فَلَيْسَ لَهُ وَإِنِ اشْتَرَطَ مِائَةَ شَرْطٍ