Witnesses, except parties to the action, are entitled to receive in advance, if demanded when subpoenaed, their traveling fees to and from the court, with their fees for one day's attendance. At the commencement of each day after the first, they are further entitled, on demand, to receive the legal fees for that day in advance. If not thus paid, they are not compelled to attend or remain as witnesses.
Iowa Code § 622.74