It is narrated from Abu Hurairah (may Allah be pleased with him) that the Prophet (ﷺ) said: "When any of your slave girls commits adultery, and her adultery becomes evident, then impose the prescribed punishment of lashes on her, but do not reproach her. If she commits adultery again and it becomes evident, then again impose the prescribed punishment of lashes on her and do not curse her. If she commits adultery a third time and it becomes evident, then sell her, even if it is for the price of a rope of hair."
Hadith Referenceمسند الإمام الشافعي / كتاب الحدود / 1580
Hadith Takhrijاخرجه البخاري، الحدود، باب لا يثرب على الامة اذا زنت ولا تنفى (6839) ومسلم، الحدود، باب رجم اليهود، اهل الذمة، في الزنى (1703)۔