When money has been deposited, a receipt shall be issued in the name of the depositor. If the money remains on deposit at the time of a judgment for the payment of a fine, the clerk shall, under the direction of the court, if the defendant be the depositor, apply the money in satisfaction thereof, and after satisfying restitution to the victim or the Restitution Fund, fines, and costs, shall refund the surplus, if any, to the defendant. If the person to whom the receipt for the deposit was issued was not the defendant, the deposit after judgment shall be returned to that person within 10 days after the person claims it by submitting the receipt, and, if a claim is not made within 10 days of the exoneration of bail, the clerk shall immediately notify the depositor of the exoneration of bail.
Ca. Pen. Code § 1297