Imam al-Shafi'i (may Allah have mercy on him) said in the narration of al-Buwayti: "The basis of kafa'ah (equality in marriage) is derived from the hadith of Sayyidah Barirah (may Allah be pleased with her): her husband was not her kuf' (equal), so the Messenger of Allah (peace and blessings be upon him) gave her the choice (to keep or end the marriage)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / Q13756
Hisham narrates from his father, and he from Sayyidah Aishah (may Allah be pleased with her), that Barirah made a contract (mukatabah) for her freedom for 9 uqiyahs, one uqiyah to be paid each year. She came to Sayyidah Aishah (may Allah be pleased with her) seeking her help, and Sayyidah Aishah (may Allah be pleased with her) said: If they wish, I will pay the price all at once, and the wala' will be mine. Barirah went and spoke to her people; they refused, except on the condition that the wala' be theirs. Barirah came to Sayyidah Aishah (may Allah be pleased with her), and the Messenger of Allah (peace and blessings be upon him) also came there. Barirah came and told Sayyidah Aishah (may Allah be pleased with her) what they had said, and Sayyidah Aishah (may Allah be pleased with her) said: This is only possible if the wala' is mine. The Messenger of Allah (peace and blessings be upon him) said: "Buy her, stipulate the wala' (for them), and set her free, for the wala' belongs to the one who sets free." Then he (peace and blessings be upon him) addressed the people; he praised and extolled Allah and said: "What is wrong with people who stipulate conditions that are not in the Book of Allah? They say: 'O so-and-so, set (him) free, and the wala' will be mine.' The Book of Allah is more truthful, the conditions of Allah are more reliable, and any condition that is not in the Book of Allah is void, even if it be a hundred conditions." Sayyidah Aishah (may Allah be pleased with her) said: The Messenger of Allah (peace and blessings be upon him) gave Barirah the choice regarding her husband. Her husband was a slave, so Barirah chose herself (that is, she separated from him). Urwah said: If he had been free, the Prophet (peace and blessings be upon him) would not have given Barirah the choice.
(b) The narration of Ishaq bin Ibrahim is in (Sahih) Muslim. It contains the evidence we intended, and (shows) that the wala' belongs only to the one who sets free, not to anyone else. Among the rulings of wala' is that guardianship in marriage is also established (for the holder of the wala') when no related guardian exists.
There are other hadiths too regarding the consideration of kafa'ah (equality in marriage), but it is not correct to take them as proof. (And Allah knows best.)
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13756
Muhammad bin Umar bin Ali bin Abi Talib (may Allah have mercy on him) narrates from his father, and he from his grandfather (Sayyiduna Ali bin Abi Talib (may Allah be pleased with him)), that the Messenger of Allah (peace and blessings be upon him) said to him: "Do not delay three things: 1. the prayer, when its time has come; 2. the funeral, when it is present; 3. the marriage of a widow, when a suitable match (kuf') is found."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13757
Sayyidah Aishah (may Allah be pleased with her) said that the Messenger of Allah (peace and blessings be upon him) said: "Choose (carefully) for your offspring, marry those who are your equals, and give (your daughters) in marriage to them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13758
Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) said that the Messenger of Allah (peace and blessings be upon him) said: "Women should be married only to their equals, only their guardians should marry them off, and the mahr should not be less than ten dirhams."
This hadith is extremely weak. Ali (al-Daraqutni) (may Allah have mercy on him) said: Mubashshir bin Ubayd is matruk al-hadith (abandoned in hadith); his hadiths are not corroborated. Baqiyyah also narrated it from Mubashshir, from al-Hajjaj, from Abu al-Zubayr, from Jabir, and it is weak; no proof is established by the like of it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13760
Sayyiduna Jabir (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Only the guardians should marry women off, their marriages should be made only with equals, and the mahr should not be less than ten dirhams."
Ibn Khuzaymah said regarding the narrator Mubashshir: "I am free of responsibility for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13761
Ibrahim bin Muhammad bin Talhah narrates that Sayyiduna Umar (may Allah be pleased with him) said: It is not fitting for women of noble lineage to be married except to their equals.
The Shaykh said: Imam al-Shafi'i (may Allah have mercy on him) said that the condition of a guardian in marriage exists precisely so that a woman does not marry someone who is not her equal. This whole arrangement exists only so that she cannot marry someone who is not her equal.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13762