It was narrated from Ubadah bin Samit that the Messenger of Allah (ﷺ) said:
"Whoever among you undergoes a Hadd, his punishment has been brought forward, and it is an expiation for him otherwise his case rests with Allah." (JA)
English reference (JA): Vol. 3, Book 20, Hadith 2603 (JA)
Arabic reference (JA): Book 20, Hadith 2701 (JA)