(1) If the defendant is not released on personal recognizance under ORS 135.255, or granted conditional release under ORS 135.260, or fails to agree to the provisions of the conditional release, the magistrate shall set a security amount that will reasonably assure the defendant’s appearance. The defendant shall execute the security release in the amount set by the magistrate.(2) The defendant shall execute a release agreement and deposit with the clerk of the court before which the proceeding is pending a sum of money equal to 10 percent of the security amount, but in no event shall such deposit be less than $25. The clerk shall issue a receipt for the sum deposited. Upon depositing this sum the defendant shall be released from custody subject to the condition that the defendant appear to answer the charge in the court having jurisdiction on a day certain and thereafter as ordered by the court until discharged or final order of the court. Once security has been given and a charge is pending or is thereafter filed in or transferred to a court of competent jurisdiction the latter court shall continue the original security in that court subject to ORS 135.280 and 135.285. When conditions of the release agreement have been performed and the defendant has been discharged from all obligations in the cause, the clerk of the court shall return to the person shown by the receipt to have made the deposit, unless the court orders otherwise, 85 percent of the sum which has been deposited and shall retain as security release costs 15 percent, but not less than $5 nor more than $750, of the amount deposited. The interest that has accrued on the full amount deposited shall also be retained by the clerk. The amount retained by the clerk of a circuit court shall be paid over as directed by the State Court Administrator for deposit in the General Fund. The amount retained by a justice of the peace shall be deposited in the county treasury. The amount retained by the clerk of a municipal court shall be deposited in the municipal corporation treasury. At the request of the defendant the court may order whatever amount is repayable to defendant from such security amount to be paid to defendant’s attorney of record.(3) Instead of the security deposit provided for in subsection (2) of this section the defendant may deposit with the clerk of the court an amount equal to the security amount in cash, stocks, bonds, or real or personal property situated in this state with equity not exempt owned by the defendant or sureties worth double the amount of security set by the magistrate. The stocks, bonds, real or personal property shall in all cases be justified by affidavit. The magistrate may further examine the sufficiency of the security as the magistrate considers necessary.