When any bond or undertaking is authorized in any civil or criminal action or proceeding, the would-be obligor may, in lieu thereof and with like legal effect, deposit with the proper court or officer cash or certified bank checks or U.S. bonds or bank certificates of deposit in an amount at least equal to the required security; and the receiver thereof shall give a receipt therefor and shall notify the payor bank of any deposits of bank certificates of deposit. Section 808.07 shall govern the procedure so far as applicable.