The taking of bail consists of the acceptance by a competent court or magistrate, or a legally authorized officer, of an undertaking with sufficient sureties for the appearance of the defendant in person, according to the terms of the undertaking, or that the sureties will pay to the state a specified sum.
N.D.C.C. § 29-08-03