In all actions where, before suit brought, tender shall be made and full payment offered, by discount or otherwise, in such specie and at such time and place as the party, by contract or agreement, ought to do, and the thing tendered, if in money, shall be deposited in court, or if not money, committed under an order of court to the sheriff or other officer of court, for the use of the plaintiff, before the trial of the cause shall commence, and the party to whom such tender shall be made doth refuse the same, and yet afterward will sue for the debt or property so tendered, the plaintiff shall not recover any costs in such suit, but the defendant shall recover costs, as if the judgment in the cause had gone in his favor upon the merits.
§ 514.230, RSMo