BAYHAQI 17592:
from ʿUbādah b. al-Ṣāmit —
[Machine] We were with the Messenger of Allah ﷺ in a gathering when he said, "Pledge allegiance to me that you will not associate anything with Allah." And he recited the verse to them and said, "Whoever fulfills it will have his reward with Allah, and whoever commits anything of it will be punished, which will be an expiation for him. And whoever commits anything of it and Allah conceals it for him, then it is up to Allah, if He wills, to forgive him, and if He wills, to punish him." This is the narration of Imam al-Shafi'i, recorded in Saheeh from a group of narrators from Sufyan ibn Uyaynah. Al-Shafi'i said in the narration of Abu Sa'eed, "I have not heard a narration regarding the prescribed punishments clearer than this, and it has been narrated from the Prophet ﷺ that he said, 'Who knows, perhaps the prescribed punishments were revealed as an expiation for sins."
البيهقي ١٧٥٩٢:
عن عباده بن الصامت —
كُنَّا مَعَ رَسُولِ اللهِ ﷺ فِي مَجْلِسٍ فَقَالَ بَايِعُونِي عَلَى أَنْ لَا تُشْرِكُوا بِاللهِ شَيْئًا وَقَرَأَ عَلَيْهِمُ الْآيَةَ وَقَالَ فَمَنْ وَفَى مِنْكُمْ فَأَجْرُهُ عَلَى اللهِ وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَعُوقِبَ فَهُوَ كَفَّارَةٌ لَهُ وَمَنْ أَصَابَ مِنْ ذَلِكَ شَيْئًا فَسَتَرَهُ اللهُ عَلَيْهِ فَهُوَ إِلَى اللهِ إِنْ شَاءَ غَفَرَ لَهُ وَإِنْ شَاءَ عَذَّبَهُ لَفْظُ حَدِيثِ الشَّافِعِيِّ وَأَخْرَجَاهُ فِي الصَّحِيحِ عَنْ جَمَاعَةٍ عَنْ سُفْيَانَ بْنِ عُيَيْنَةَ قَالَ الشَّافِعِيُّ فِي رِوَايَةِ أَبِي سَعِيدٍ لَمْ أَسْمَعْ فِي الْحُدُودِ حَدِيثًا أَبْيَنَ مِنْ هَذَا وَقَدْ رُوِيَ عَنِ النَّبِيِّ ﷺ أَنَّهُ قَالَ وَمَا يُدْرِيكَ لَعَلَّ الْحُدُودَ نَزَلَتْ كَفَّارَةً لِلذُّنُوبِ
hadithunlocked.com