If a person in any state which by its laws has made provision for commanding persons within its borders to attend and testify in criminal prosecutions, or grand jury investigations commenced or about to commence in this State, is a material witness in a prosecution pending in a court of record in this State, or in a grand jury investigation which has commenced or is about to commence, a judge of such court may issue a certificate under the seal of the court, stating these facts and specifying the number of days the witness will be required. Said certificate may include a recommendation that the witness be taken into immediate custody and delivered to an officer of this State to assure his attendance in this State. This certificate shall be presented to a judge of a court of record in the county in which the witness is found.
If the witness is summoned to attend and testify in this State he shall be compensated at the rate allowed to State officers and employees by subdivisions (1) and (2) of G.S. 138-6(a) for each mile by the ordinary traveled route to and from the court where the prosecution is pending, and five dollars ($5.00) for each day that he is required to travel and attend as a witness. A witness who has appeared in accordance with the provisions of the summons shall not be required to remain within this State a longer period of time than the period mentioned in the certificate unless otherwise ordered by the court. If such a witness is required to appear more than one day, he is also entitled to reimbursement for actual expenses incurred for lodging and meals, not to exceed the maximum currently authorized for State employees when traveling in the State. If such witness, after coming into this State, fails without good cause to attend and testify as directed in the summons, he shall be punished in the manner provided for the punishment of any witness who disobeys a summons issued from a court of record in this State.
N.C. Gen. Stat. § 15A-813