Sunan Ibn Majah, Book 20, Hadith 34 (Ibn Majah 2568)
'Aishah narrated that the Messenger of Allah(ﷺ) said:
“If a slave woman commits fornication then whip her, and if she commits fornication then whip her, and if she commits fornication then whip her, then sell her even if that is for a rope.”