When a defendant is sentenced, the court may order the individual to pay the costs of prosecution, any fines, and/or restitution related to the case. Several factors may be involved in the determination of the defendant's court-ordered fees. Some fines are mandated by law, while others are determined by the court. Court costs are mandated by law or local rule. Restitution is determined based on the amount of damage incurred.