Art. 337. If the bail is declared null or void or the judgment acquitting the accused or the criminal action is declared extinct, the updated amount will be refunded without discount, except as provided in the sole paragraph of article 336 of this Code. .
Bail and acquittal or dismissal of the criminal action
Refund without discounts: The value of the guarantee will be refunded without discounts and duly updated, when one of these hypotheses occurs: (1) the guarantee is declared void; (2) make the acquittal final and unappealable; (3) the criminal action is declared extinct.
Reimbursement with discounts: In the case of prescription after the condemnatory sentence (execution limitation), the costs and indemnity must be paid, and the rest is refunded. It is the hypothesis of the sole paragraph of article 336 .
Extinction of the criminal action: According to article 107 of the CP , punishment is extinguished: by the death of the agent, by amnesty, grace or pardon, by the retroactivity of the law that no longer considers the fact as criminal, by prescription, decay or peremption, for the waiver of the right of complaint or for the pardon accepted, in crimes involving private action, for the retraction of the agent, in cases where the law admits it, and for judicial pardon, in the cases provided for by law.