In an action on contract for the payment of money, if the defendant answers and proves that he tendered payment of the money due before commencement of the action, and pays to the clerk before trial the money so tendered, the plaintiff shall not have judgment for more than the money so tendered and due, without costs, and shall pay the defendant his costs.
W.S. 1-10-101