Sunan Abi Dawud 4470
Abu Hurairah reported the Prophet (ﷺ) as saying:
When the slave-woman of any of you commits fornication, he should inflict the prescribed punishment on her, but not hurl reproaches at her. This is to be done up to three times. If she a fourth time, he should flog her, and sell her even if only for a rope of hair.
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، حَدَّثَنِي سَعِيدُ بْنُ أَبِي سَعِيدٍ الْمَقْبُرِيُّ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏
"‏ إِذَا زَنَتْ أَمَةُ أَحَدِكُمْ فَلْيَحُدَّهَا وَلاَ يُعَيِّرْهَا ثَلاَثَ مِرَارٍ فَإِنْ عَادَتْ فِي الرَّابِعَةِ فَلْيَجْلِدْهَا وَلْيَبِعْهَا بِضَفِيرٍ أَوْ بِحَبْلٍ مِنْ شَعْرٍ ‏"‏ ‏.‏