When the defendant has been admitted to bail, he, or another in his behalf, may make a cash bond by depositing with an official authorized to take bail, a sum of money, or nonregistered bonds of the United States, or of the state, or of any county, city or town within the state, equal in market value to the amount of such bail, together with his personal undertaking and an undertaking of such other person, if the money or bonds are deposited by another. Upon delivery to the official, in whose custody the defendant is, of a certificate of such deposit, he shall be discharged from custody in the cause.
Okla. Stat. tit. 59, § 1323