Sayyiduna Ali bin Husayn (may Allah have mercy on him) narrates from Sayyiduna Ali (may Allah be pleased with him) concerning a man who bought a slave girl, had intercourse with her, and then discovered a defect in her. He said: She stays with him, and the seller pays the difference between (her value when) sound and (when) defective. If he has not had intercourse with her, he may return her.
It is mursal: Ali bin al-Husayn did not meet his grandfather Ali. It has also been narrated from Muslim bin Khalid, from Ja'far, from his father, from his grandfather, from Husayn bin Ali, from Ali, but that is not mahfuz (preserved).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10745
Sayyiduna Umar (may Allah be pleased with him) said: If she is a previously married woman (thayyib), a twentieth part (of the price) is returned with her; and if she is a virgin, a tenth part is returned.
Ali (al-Daraqutni) said: This is mursal; Amir did not meet Umar. Al-Shafi'i said: We do not know it to be established from Umar or from Ali, nor from either of them; and likewise some of the people of hadith who were present said that it is not established.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10746