Ubada bin Samit reported,

The Prophet of Allah ﷺ would be seized with distress whenever revelation descended upon him, and his face would darken. One day revelation came down upon him and he was affected in that way, and when it had passed from him he said, "Take this from me. Allah has now appointed a way for them. The married with the married, and the unmarried with the unmarried. The married one receives a hundred lashes and then stoning with stones, and the unmarried one receives a hundred lashes and then banishment for a year."In the version narrated by the two of them, the wording is that the unmarried one is flogged and banished, and the married one is flogged and stoned, without mentioning a year or a hundred.

Muslim 4417

Sahih

و حدثنا محمد بن المثنى وابن بشار قالا حدثنا محمد بن جعفر حدثنا شعبة ح و حدثنا محمد بن بشار حدثنا معاذ بن هشام حدثني أبي كلاهما عن قتادة بهذا الإسناد غير أن في حديثهما البكر يجلد وينفى والثيب يجلد ويرجم لا يذكران سنة ولا مائة

مسلم 4417صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Legal punishments
Chapter
Hadd of zina
Numbering
Darussalam 4417
Muslim 4417