When an action is brought or a claim is made in an action on a bond, note or other contract containing a penalty to secure the payment of money only, the true sum due and not the penalty, shall be deemed to be the debt due. In all such actions or claims wherein the plaintiff or claimant shall succeed, judgment shall be entered only for such amount as the case may require, with interest until paid.
N.J.S. § 2A:55-3