A man came to the prophet ﷺ and said : Messenger of Allah ! I have committed a crime which involves prescribed punishment so inflict it on me . He said : Have you not performed ablution when you came? He said : Yes, He said: Have you not prayed with us when we prayed ? He said : Yes .He then said : Go off, for Allah, the Exalted, forgave you. (Using translation from Abū Dāʾūd 4381)
يَا رَسُولَ اللهِ إِنِّي أَصَبْتُ حَدًا فَأَقِمْهُ عَلَيَّ قَالَ «هَلْ تَوَضَّأْتَ حِينَ أَقْبَلْتَ؟» قَالَ نَعَمْ قَالَ «هَلْ صَلَّيْتَ مَعَنَا؟» قَالَ نَعَمْ قَالَ «فَاذْهَبْ فَإِنَّ اللهَ قَدْ عَفَا عَنْكَ»