The Prophet ﷺ said, "If a slave-girl commits illegal sexual intercourse and it is proved beyond doubt, then her owner should lash her and should not blame her after the legal punishment. And then if she repeats the illegal sexual intercourse he should lash her again and should not blame her after the legal punishment, and if she commits it a third time, then he should sell her even for a hair rope." (Using translation from Bukhārī 2152)
"إِذَا زَنَتْ أمةُ أحدكم، فتَبَّين زناها فليجلدْها الحدَّ، ولا يُثرِّب عليها، ثم إن زنت فليَجْلِدْهَا الحدِّ ولا يُثَرِّب عليها، ثم إن زَنَتْ الثالثَة فَليَبِعْهَا ولو بِحَبْلٍ من شَعْرٍ".