Sunan an-Nasa'i, Book 26, Hadith 167 (In-Book)

It was narrated from An-Nu'man bin Bashir that the Messenger of Allah said, concerning a man who had intercourse with his wife's slave woman: "If she let him do that, I will flog him with one hundred stripes, and if she did not let him do that, I will stone him (to death)."

أَخْبَرَنَا أَبُو دَاوُدَ، قَالَ حَدَّثَنَا عَارِمٌ، قَالَ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ سَعِيدِ بْنِ أَبِي عَرُوبَةَ، عَنْ قَتَادَةَ، عَنْ حَبِيبِ بْنِ سَالِمٍ، عَنِ النُّعْمَانِ بْنِ بَشِيرٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ فِي رَجُلٍ وَقَعَ بِجَارِيَةِ امْرَأَتِهِ ‏ "‏ إِنْ كَانَتْ أَحَلَّتْهَا لَهُ فَأَجْلِدْهُ مِائَةً وَإِنْ لَمْ تَكُنْ أَحَلَّتْهَا لَهُ فَأَرْجُمْهُ ‏" ‏ ‏.‏

sunnah.com