وَعَنْ خُزَيْمَةَ بْنِ ثَابِتٍ
قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ أَصَابَ ذَنْبًا أُقِيمَ عَلَيْهِ حَدُّ ذَلِكَ الذَّنْبِ فَهُوَ كفارتُه»
The Messenger of Allah (sallallahu alayhi wa sallam) said:, “If anyone commits a sin and has inflicted on him the prescribed punishment for that sin, it is an atonement for him.” It is transmitted in Sharh as-sunna.