If money is deposited, as provided in G.S. 1-426 and 1-427, bail may be given and justified upon notice according to law at any time before judgment. Thereupon the court or judge shall direct, in the order of allowance, that the money deposited be refunded by the sheriff or other officer to the defendant, and it shall be refunded accordingly.
N.C. Gen. Stat. § 1-428