The Messenger of Allah ﷺ said, "Take this teaching from me, for Allah has now appointed a way for them. The married person who commits adultery with another married person receives one hundred lashes followed by stoning, and the unmarried person who fornicates with another unmarried person receives one hundred lashes and banishment for one year."
حدثنا قتيبة حدثنا هشيم عن منصور بن زاذان عن الحسن عن حطان بن عبد الله
قال رسول الله ﷺ خذوا عني فقد جعل الله لهن سبيلا الثيب بالثيب جلد مائة ثم الرجم والبكر بالبكر جلد مائة ونفي سنة
Muslim also narrated it in the Book of Legal Punishments, the chapter on the punishment for fornication, hadith no. 1690, from the hadith of Hushaym, with the same wording.