On the authority of others, that the Prophet (ﷺ) said, "No Punishment exceeds the flogging of the ten stripes, except if one is guilty of a crime necessitating a legal punishment prescribed by Allah."
Sahih al-Bukhari Book 86, Hadith 71