Imam al-Shafi'i (may Allah have mercy on him) says: Ta'zir (discretionary punishment) is discipline; it is not one of the hadd punishments of Allah, and it is also permissible to leave it. Do you not see that some things were done in the time of the Messenger of Allah (peace and blessings be upon him) that were not hadd offences, such as misappropriating spoils in the path of Allah and other things, and he did not inflict beating for them; yet a hadd case was never brought to him that he pardoned. It has also been said that Sayyiduna Umar (may Allah be pleased with him) sent for a woman concerning something he had heard about her, and she miscarried. Sayyiduna Umar (may Allah be pleased with him) sought counsel about it, and one man said: You are a mu'addib (one who disciplines). Sayyiduna Ali (may Allah be pleased with him) said to him: If he said this from ijtihad, he erred; and if he did not exercise ijtihad, he has deceived you. The blood money (diyah) is upon you. He (Umar) said: I adjure you not to sit until you distribute it among your people. And Sayyiduna Ali (may Allah be pleased with him) said: No one dies under a hadd punishment about whom I feel anything in my heart; the truth killed him, except one who dies under the hadd of wine, for that is something we arrived at after the Prophet (peace and blessings be upon him). Whoever dies under it, his blood money is, he said, either upon the public treasury (bayt al-mal), or, he said, upon the 'aqilah (paternal kin) of the imam.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الإجارة / 11672