
442 N.W.2d 57 (1989)
STATE of Iowa, Appellee,
v.
Percy E. BRADY, Appellant.
No. 88-423.
Supreme Court of Iowa.
Decided June 14, 1989.
Robert E. Lee of Arends & Lee, Humboldt, for appellant.
Thomas J. Miller, Atty. Gen., Christie J. Scase, Asst. Atty. Gen., and Lee E. Poppen, County Atty., for appellee.
Considered by HARRIS, P.J., and LARSON, SCHULTZ, LAVORATO, and NEUMAN, JJ.
LARSON, Justice.
Defendant, Percy E. Brady, challenges his sentence as an habitual offender under Iowa Code section 902.8 (1983). He claims that his admission in open court of two prior felony convictions was tantamount to a plea of guilty under the habitual offender statute and that the court had failed to advise him fully regarding the possible punishment for an habitual offender as required by Iowa Rule of Criminal Procedure 8(2)(b). Specifically, he complains that the court erred in failing to inform him that payment of court costs would be included in his "punishment." The district court rejected the argument, and we affirm.
Brady was charged in 1983 with burglary in the second degree, a class C felony under Iowa Code section 713.5 (1983). A separate county attorney's information alleged that Brady was an habitual offender having previously been convicted of at least two felonies. He was convicted by a jury of the current charge of second-degree burglary, and the case proceeded to sentencing.
At sentencing, the question arose whether Brady would admit the prior felony convictions as alleged in the habitual offender information. See Iowa R.Crim.P. 18(9). The court informed Brady of the minimum and maximum sentences provided under the habitual offender statute but did not mention that he would be required to pay the court costs. Following the colloquy with the court, Brady admitted the prior felonies. The court imposed a fifteen-year sentence on Brady as an habitual offender. The next day, a written judgment was entered which, for the first time, included a requirement that Brady pay the court costs, which were determined to be $220.
Almost four years after the written judgment was entered, Brady filed a motion for *58 vacation of an illegal sentence under Iowa Rule of Criminal Procedure 23(5)(a). He alleged that the court's requirement that he pay the court costs amounted to an additional penalty which the court had failed to mention at the sentencing hearing. The effect of the subsequent written order was, according to his argument, an illegal ex parte sentence.
The State first raises a procedural argument. It contends that a motion to vacate an illegal sentence is not a proper vehicle to challenge a procedural error, that it is only to be used to challenge a sentence which was void in whole or in part because of a basic problem such as lack of jurisdiction. See, e.g., State v. Wilson, 294 N.W. 2d 824, 825 (Iowa 1980). Brady responds that the written sentence is void, thus subject to attack under a motion to vacate, because it was entered ex parte. We assume for purposes of this appeal that the inclusion of the order for payment of costs in the manner in which it was done may properly be challenged by a motion under rule 23(5)(a).
Iowa Rule of Criminal Procedure 8(2)(b) provides the following, in relevant part, when a court considers a guilty plea:
Before accepting a plea of guilty, the court must address the defendant personally in open court and inform the defendant of, and determine that the defendant understands, the following:
....
(2) The mandatory minimum punishment, if any, and the maximum possible punishment provided by the statute defining the offense to which the plea is offered.
Prior to the time Brady admitted his felony convictions, the court advised him of his right to require the State to prove the prior convictions, and he was advised of the trial rights which would be waived if he were to admit the convictions. This colloquy then followed:
THE COURT: Now, do you understand that, by pleading guilty to the habitual offender charge, in fact, the admission, you would be waiving those rights; and the Court will be entering judgment on the habitual offender charge; do you understand that?
MR. BRADY: Yes.
THE COURT: And do you understand, also, that a sentence for the habitual offender shall be confinement for no more than fifteen years; do you understand that?
MR. BRADY: Yes, I do.
THE COURT: I believe you called that to my attention, and that you would not be eligible for parole until you have served the minimum sentence of confinement of three years; do you understand that?
MR. BRADY: Yes.
THE COURT: And is it still your desire to plead guilty to the offense?
MR. BRADY: Yes, it is, your Honor.
THE COURT: Very well. Now, are we ready to proceed, then, with the sentencing and the passing of judgment, counselor?
Rule 8(2)(b) governs guilty pleas and does not expressly apply to a case in which a defendant is asked to admit or deny prior convictions for habitual offender purposes under rule of criminal procedure 18(9). An admission by a defendant of prior convictions cannot be said to be a plea of guilty to an habitual offender "charge," moreover, habitual offender statutes do not charge a separate offense. They only provide for enhanced punishment on the current offense. See State v. Popes, 290 N.W.2d 926, 927 (Iowa 1980); State v. Smith, 282 N.W.2d 138, 143 (Iowa 1979).
Nevertheless, a defendant's admission of prior felony convictions which provide the predicate for sentencing as an habitual offender is so closely analogous to a plea of guilty that it is appropriate to refer to our rules governing guilty pleas, specifically, rule 8(2)(b), to resolve the issue in this case: whether the district court's failure to inform Brady of his liability for court costs amounted to a failure to inform him of the punishment provided by law, thus vitiating his admission of the prior felony convictions.
Under Iowa Code section 910.1(4), court costs are included in the definition of "restitution" to be made by a convicted *59 defendant. Iowa Code section 910.2 requires the sentencing court to order restitution for the court costs if the defendant is "reasonably able" to pay. Brady argues that this language is mandatory and makes a defendant's reimbursement for costs a form of "punishment" for purposes of rule 8(2)(b).
Brady cites in support of his argument the case of Keller v. Wyoming, 723 P.2d 1244 (Wyo.1986). In Keller, the court engaged in a colloquy with the defendant concerning the minimum and maximum sentence the defendant could receive, but it did not mention the matter of restitution. The Wyoming court held that this was error, that
[f]rom the viewpoint of a defendant in a criminal trial, payment of restitution is as much a penalty as payment of a fine. Both require the payment of money. Both are direct consequences of the plea. Both are punishments authorized by law. Restitution, therefore, is part of the "maximum possible penalty provided by law" for the purposes of Rule 15; and we hold that Rule 15(c) requires the trial judge to inform a defendant of the court's power to order restitution.
Keller, 723 P.2d at 1246-47.
We do not agree with this reasoning. As the Keller court noted, restitution (which in that case was much more substantial because it included victim restitution) requires payment of money, just as a fine does, and both a fine and restitution are direct consequences of a guilty plea. But we do not agree with its conclusion that "[b]oth are punishments authorized by law." Payment of money under a court order, standing alone, does not make it punishment. If it did, a civil judgment for compensatory damages could be considered to be punishment.
Assessment of costs does not fit the generally understood definition of punishment, which is said to be
[a]ny fine, penalty, or confinement inflicted upon a person by the authority of the law and the judgment and sentence of a court, for some crime or offense committed by him, or for his omission of a duty enjoined by law. A deprivation of property or some right. But does not include a civil penalty redounding to the benefit of an individual, such as a forfeiture of interest.
Black's Law Dictionary 1110 (5th ed. 1979).
Moreover, in actual practice, it could lead to absurd results. For example, if the prosecution lost a criminal case, we surely would not say it had suffered a criminal punishment because the costs were assessed to it. We reject the argument that rule 8(2)(b) was violated in this case and therefore affirm.
We note that Brady's attack on this sentence is quite narrow; he contends only that the "guilty plea" is defective on the ground the court costs were punishment under rule 8(2)(b). He does not argue that payment of costs is a "direct consequence" which, under our cases, must be discussed by the court in a guilty plea colloquy. See, e.g., Saadiq v. State, 387 N.W.2d 315, 325-26 (Iowa 1986); State v. Rand, 268 N.W.2d 642, 648 (Iowa 1979). We express no view on the latter question but suggest that, in future cases, courts in guilty plea proceedings fully inform defendants of the impact of the restitution provisions of Iowa Code chapter 910.
AFFIRMED.
