Legal basis: Criminal Procedure Law of People's Republic of China (PRC).
Article 288 In the following cases of public prosecution, the criminal suspect or defendant sincerely repents and obtains the victim's understanding through compensation for losses or apology. (1) If a civil dispute is caused, it is suspected of a criminal case stipulated in Chapters IV and V of the Specific Provisions of the Criminal Law and can be sentenced to fixed-term imprisonment of not more than three years; (two) criminal cases of negligence other than dereliction of duty that may be sentenced to fixed-term imprisonment of not more than seven years. If a criminal suspect or defendant intentionally commits a crime within five years, the procedures specified in this chapter shall not apply.
Article 289 If both parties reach a settlement, the public security organ, the people's procuratorate and the people's court shall listen to the opinions of the parties and other relevant personnel, examine the voluntariness and legality of the settlement, and preside over the making of a settlement agreement.