The Prophet ﷺ said: about a man who had (unlawful) intercourse with his wife's slave girl: If she made her lawful for him, he will be flogged one hundred lashes; if she did not make her lawful for him, I shall stone him. (Using translation from Abū Dāʾūd 4459)
عَنِ النَّبِيِّ ﷺ أَنَّهُ قَالَ فِي الرَّجُلِ يَأْتِي جَارِيَةَ امْرَأَتِهِ قَالَ إِنْ كَانَتْ أَحَلَّتْهَا لَهُ جَلَدْتُهُ مِائَةً وَإِنْ لَمْ تَكُنْ أَحَلَّتْهَا لَهُ رَجَمْتُهُ