Payment of the costs of prosecution may be added to and made a part of the sentence in any felony or misdemeanor case if the court determines that the defendant has an ability to pay or that a reasonable probability exists that the defendant will have an ability to pay.
W.S. 7-11-505