When a county or city or any party has paid the fees of any witness, and the same is afterward collected from the defendant or adverse party, the county, city, or person so paying the same shall, upon the production of the receipt of such witness or other satisfactory evidence, be entitled to such fee.