Okla. Stat. tit. 59, § 1328
The person desiring to make a surrender of the defendant shall procure a certified copy of the undertakings and deliver them together with the defendant to the official in whose custody the defendant was at the time bail was taken, or to the official into whose custody he would have been given had he been committed, who shall detain the defendant in his custody thereon, as upon a commitment, and by a certificate in writing acknowledge the surrender.
Upon the presentation of certified copy of the undertaking and the certificate of the official, the court before which the defendant has been held to answer or the court in which the preliminary examination, indictment, information or appeal, as the case may be is pending shall, upon notice of three (3) days given by the person making the surrender to the prosecuting officer of the court having jurisdiction of the offense, together with a copy of the undertakings and certificate, order that the obligors be exonerated from liability on their undertakings; and, if money has been deposited as bail, that such money or bonds be refunded. If property pledged, a certificate of exoneration be issued and the lien previously filed be released and the undertakings of whatever nature be canceled.
Laws 1965, HB 642, c. 184, § 28, eff. January 1, 1966.