The fees of witnesses on the part of the state in every criminal action or proceeding, and of every person who is committed to jail in default of security for the person's appearance as a witness, shall be paid by the county in which the action or proceeding is had. The clerk of the court upon proof of the witness's or committed person's attendance, travel or confinement shall give each such witness or person a certificate of the number of days' attendance or confinement, the number of miles traveled, and the amount of compensation due the witness or committed person, which certificate shall be receipted for by such witness or person, and the county treasurer shall pay the amount thereof on surrender of the certificate.
Wis. Stat. § 885.08