The county treasurer shall file a notice of said payment and the amount thereof with the institution in which said person, upon whose application the transcript of the record was prepared, is confined, and, to the extent of the expense incurred, the county treasurer shall be reimbursed from any institutional earnings of such person, in the event that the application for relief is denied by the trial court or an appellate court.
N.J.S. § 2A:152-18