Ubada bin Samit reported,

The Messenger of Allah ﷺ said, "Whoever among you commits an offense deserving a prescribed penalty and the punishment is carried out upon him, that serves as its expiation. Otherwise, his affair rests with Allah."

Ibn Majah 2603

Sahih

حدثنا محمد بن المثنى حدثنا عبد الوهاب وابن أبي عدي عن خالد الحذاء عن أبي قلابة عن أبي الأشعث

عن عبادة بن الصامت قال

قال رسول الله ﷺ من أصاب منكم حدا فعجلت له عقوبته فهو كفارته وإلا فأمره إلى الله

ابن ماجه 2603صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Legal punishments
Chapter
Legal punishment is expiation
Numbering
Darussalam 2603
Ibn Majah 2603