delivered the opinion of the court:
After defendant Ricardo L. Penson entered a plea of guilty to five counts of deceptive practice, he was sentenced to felony probation and ordered to pay restitution to the complaining bank. Subsequently, he was found guilty of indirect criminal contempt for making a willful misrepresentation to the court at the time of the plea agreement and for willful refusal to comply with the conditions of probation. He was sentenced to the Cook County Department of Corrections for 30 days.
Although defendant lists eight issues on appeal, we find two to be dispositive: (1) whether the State failed to prove beyond a reasonable • doubt that defendant’s misrepresentation was willful and therefore' constituted indirect criminal contempt of court; and (2) whether the court erred in failing to give defendant an opportunity to purge his contempt. We reverse.
On May 8, 1985, the court accepted Penson’s plea expressly conditioned upon the truth of his representation that he had wired $5,200 through a Texas bank to the victim bank. When questioned, Penson testified that he had authorized the wire transfer with his secretary in his Dallas office. He stated that his secretary had confirmed the transfer and had given him the bank receipt number, the time, and the name of the woman at the Federal Reserve Bank who took the order.
The court placed Penson on 30 months’ probation and ordered him to pay restitution of $492 per month. The conditions of probation included: “Defendant states he wired $5,200 to United National Bank on May 7, 1985 at 1:57 p.m.”
On January 14, 1986, the State filed a petition for violation of probation alleging that Penson had not paid the last two monthly payments and that the bank had not received the $5,200. The petition stated further that Penson was subject to various charges including contempt of court.
A violation of probation/contempt hearing was held on August 21, 1986. Penson testified that on May 9, 1985, he discovered the wire transfer of $5,200 had not occurred and immediately authorized two other transfers of $610 and $800. However, at the time of the hearing, more than one year and three months later, the bank had not yet received all of the $5,200 payment.
The trial court held that Penson’s misrepresentation, that he had wired the money to the bank, was willful and that he had failed to comply with the order of restitution. The court sentenced Penson to a term of 30 days.
Penson appeals.
Meanwhile, his probation for the initial offense was terminated August 31, 1988. That termination states: “Restitution paid in full per letter of release.”
I
Penson’s first issue on appeal is whether the State failed to prove beyond a reasonable doubt that he had made a willful misrepresentation.
In criminal contempt cases, the State must prove the element of knowledge or willfulness. (People v. Sheahan (1986), 150 Ill. App. 3d 572, 574, 502 N.E.2d 48, 50.) A finding of willful contempt is a matter of fact and “will not be disturbed on appeal unless there is a clear abuse of discretion.” People ex rel. Hartigan v. Jansen (1986), 151 Ill. App. 3d 208, 213, 502 N.E.2d 1129, 1133.
For this finding, guilt must be proved beyond a reasonable doubt. (Jansen, 151 Ill. App. 3d at 213, 502 N.E.2d at 1133.) When a reviewing court must consider whether the State met its burden of proof, “ ‘the relevant question is whether, after viewing the evidence in the light most favorable to the prosecution, any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt.’ ” People v. Young (1989), 128 Ill. 2d 1, 49, 538 N.E.2d 461, 472, quoting Jackson v. Virginia (1979), 443 U.S. 307, 318-19, 61 L. Ed. 2d 560, 573-74, 99 S. Ct. 2781, 2788-89.
Defendant contends that the State did not prove he had willfully misrepresented facts to the court. At the plea hearing, Penson entered into an agreement which was expressly conditioned upon the fact that he had already wired $5,200 to the victim bank. Upon questioning, Penson testified that he had not personally wired the money but had authorized his secretary in Texas to complete the transfer and had obtained a receipt number and other information to indicate that the transfer had occurred. Thus, he testified that he believed the money had been sent but did not truly know because he was relying on information from his secretary. The State did not present any direct evidence showing that Penson knew the money had not been sent at the time of the hearing.
Penson claims that when he discovered the money had not been transferred as he believed, he sent $1,410 to the bank. By the time of the contempt hearing, however, he had paid only $4,610 out of over $19,000 owed.
The trial court found that Penson’s misrepresentation at the plea hearing was willful. Looking at the court testimony, however, it appears that Penson stated his belief, held in good faith, that money had been wired by his secretary. This belief proved erroneous. The fact that Penson told the court his erroneous belief does not prove that he willfully misrepresented facts to the court. While the record may tend to prove that Penson willfully refused to comply with the conditions of his probation, it is devoid of evidence which would tend to show that his misrepresentation was willful.
Furthermore, while Pensons’ willful refusal to comply with conditions of probation may constitute civil contempt, we do not believe, based on our discussion of the next issue, that his actions rose to the level of indirect criminal contempt.
For these reasons, we hold that the State failed to meet its burden of proving that Penson’s misrepresentation was willful.
II
Penson also argues that the trial court erred when it failed to allow him to purge his contempt by paying the money owed, which is proper procedure in cases of civil contempt.
Contempt of court is “any act which is calculated to embarrass, hinder, or obstruct a court in the administration of justice, or which is calculated to lessen its authority or dignity.” (People v. Gholson (1952), 412 Ill. 294, 298, 106 N.E.2d 333, 335.) Criminal contempt is action directed against the dignity or authority of the court, and civil contempt is failure to obey a court’s order for the benefit of an opposing party in a civil action. (Gholson, 412 Ill. at 298, 106 N.E.2d at 336.) Consequently, criminal contempt sanctions preserve the dignity of the court and civil sanctions aim to enforce rights of private parties and to compel obedience to orders. (In re Marriage of Wilde (1986), 141 Ill. App. 3d 464, 469, 490 N.E.2d 95, 98-99.) Since imprisonment for civil contempt is coercive in purpose, it can usually be avoided by compliance with the court’s orders. Hoga v. Clark (1983), 113 Ill. App. 3d 1050, 1058, 448 N.E.2d 196, 201.
Classifying a particular action as criminal or civil is often difficult because many cases involve elements of both. (Gholson, 412 Ill. at 298-99, 106 N.E.2d at 336.) The test for classifying contempt is the totality of circumstances as these influence the court’s purpose to either punish the defendant or coerce his compliance with a court order. (See People v. Marcisz (1975), 32 Ill. App. 3d 467, 471-72, 357 N.E.2d 477, 479.) Generally, for instance, imprisoning a party for failure to pay money is not solely for the purpose of punishing the contemnor, but also to force payment. Sullivan v. Sullivan (1973), 16 Ill. App. 3d 549, 552, 306 N.E.2d 604, 606.
Courts have found that violation of probation in the form of failure to pay costs or restitution can be treated as civil contempt. (People v. Mowery (1983), 116 Ill. App. 3d 695, 701, 452 N.E.2d 363, 368; People v. Bertalot (1988), 164 Ill. App. 3d 89, 92-93, 518 N.E.2d 465, 469.) The Unified Code of Corrections also provides a mechanism for enforcing payment of criminal penalties through civil contempt. Ill. Rev. Stat. 1987, ch. 38, pars. 1005 — 9—3(a), (b).
The court sentenced Penson both because he made a willful misrepresentation to the court, an act against the court’s dignity, and because he failed to make restitution to the victim. Our analysis here has concluded that the court did not have sufficient evidence to support a conviction for the first reason. Furthermore, an examination of the above-cited authorities leads us to conclude that Penson’s failure to abide by the court order of restitution is best characterized as civil contempt.
Once contempt has been classified as civil, then the contemner “holds the keys to the cell” in his pocket, i.e., he has the power to purge his contempt by obeying the court order. (In re Marriage of Rodriguez (1989), 131 Ill. 2d 273, 281, 545 N.E.2d 731, 734.) The “key” in a case with restitution is full payment of whatever is due. (Mowery, 116 Ill. App. 3d at 702, 452 N.E.2d at 368.) This key frees the contemnor even if the payment is part of a criminal sentence. Ill. Rev. Stat. 1987, ch. 38, pars. 1005 — 9—3(a), (b); Bertalot, 164 Ill. App. 3d at 93, 518 N.E.2d at 469.
Since Penson has paid his restitution in full, his contempt has been purged.
For these reasons, we reverse.
Judgment reversed and sentence vacated.
LaPORTA, P.J., concurs.