Any person upon whom any fine or costs, or both, has been imposed for violation of a municipal ordinance may, after hearing, be committed upon order of the court to jail or other place provided by the municipality for the incarceration of offenders until the fine or costs, or both, are fully paid or discharged by labor as provided in section 40-18-12. The court may not commit a person under this section when the sole reason for the person's nonpayment of fines or costs, or both, is the person's indigency. An order of commitment under this section shall not be for a period in excess of thirty days. As used in this section, "fine" does not include a fee established pursuant to subsection 2 of section 40-05-06.
N.D.C.C. § 40-11-12