A man who had drunk wine was brought before the Prophet ﷺ when he was in Hunayn. He threw some dust on his face. He then ordered his Companions and they beat him with their sandals and whatever they had in their hands. He then said to them: Leave him, and they left him. The Messenger of Allah ﷺ then died, and AbuBakr gave forty lashes for drinking wine, and then Umar in the beginning of his Caliphate inflicted forty stripes and at the end of his Caliphate he inflicted eighty stripes. Uthman (after him) inflicted both punishments, eighty and forty stripes, and finally Mu'awiyah established eighty stripes. (Using translation from Abū Dāʾūd 4488)
أَنَّ رَسُولَ اللهِ ﷺ أُتِيَ بِشَارِبٍ وَهُوَ بِخَيْبَرَ فَحَثَى فِي وَجْهِهِ التُّرَابَ ثُمَّ أَمَرَ أَصْحَابَهُ فَضَرَبُوهُ بِنِعَالِهِمْ وَبِمَا كَانَ فِي أَيْدِيهِمْ حَتَّى قَالَ لَهُمْ «ارْفَعُوهُ» فَرَفَعُوا فَتُوُفِّيَ رَسُولُ اللهِ ﷺ وَتِلْكَ سُنَّتُهُ ثُمَّ جَلَدَ أَبُو بَكْرٍ فِي الْخَمْرِ أَرْبَعِينَ ثُمَّ جَلَدَ عُمَرُ ؓ أَرْبَعِينَ صَدْرًا مِنْ إِمَارَتِهِ ثُمَّ جَلَدَ ثَمَانِينَ فِي آخِرِ خِلَافَتِهِ « ثُمَّ جَلَدَ عُثْمَانُ ؓ الْحَدَّ أَرْبَعِينَ ثُمَّ مُعَاوِيَةُ ؓ ثَمَانِينَ»