Messenger of Allah, I have committed an offence which deserves imposition of haad, so impose it upon me according to the Book of Allah. Thereupon he said: Were you not present with us at the time of prayer? He said: Yes. Thereupon he said: You have been granted pardon. (Using translation from Muslim 2764)
جَاءَ رَجُلٌ إِلَى النَّبِيِّ ﷺ فَقَالَ يَا رَسُولَ اللَّهِ أَصَبْتُ حَدًّا قَالَ فَلَمْ يَسْأَلْهُ عَنْهُ وَأُقِيمَتِ الصَّلَاةُ فَصَلَّى النَّبِيُّ ﷺ فَلَمَّا فَرَغَ مِنْ صَلَاتِهِ قَالَ يَا رَسُولَ اللَّهِ أَصَبْتُ حَدًّا فَأَقِمْ فِيَّ كِتَابَ اللَّهِ قَالَ «أَصَلَّيْتَ مَعَنَا الصَّلَاةَ؟» قَالَ نَعَمْ قَالَ «قَدْ غُفِرَ لَكَ»