
287 N.W.2d 151 (1980)
FIRST NORTHWESTERN NATIONAL BANK, DENISON, Iowa, Appellee,
v.
Doris L. CROUCH, Appellant.
No. 63098.
Supreme Court of Iowa.
January 23, 1980.
*152 Warren L. Bush, Wall Lake, for appellant.
Robert L. Brink of Nash, Eller, Brink & Claussen, Denison, for appellee.
Considered by LeGRAND, P. J., and REES, UHLENHOPP, HARRIS, and McCORMICK, JJ.
McCORMICK, Justice.
The main question in this appeal is whether the parties could and did contract to make a transaction subject to the Iowa Consumer Credit Code (ICCC), chapter 537, The Code, when it would not otherwise be covered. The trial court held they did not do so in this case. We hold they could and did do so. Plaintiff First Northwestern National Bank did not give defendant a notice of right to cure as required under sections 537.5110-.5111, The Code, before bringing the present action on the promissory note of defendant Doris L. Crouch. Therefore we reverse plaintiff's judgment on the note and on defendant's counterclaim and remand for further proceedings.
On June 1, 1977, Wilbur Crouch and his wife Doris executed a six-month note to plaintiff for $9500 in behalf of Wilbur's business, Crouch Distributing Company. They also executed a security agreement covering the accounts, inventory, equipment and fixtures of the business. The note was not paid when it came due. Plaintiff brought the present action on it without giving the Crouches a notice of right to cure. Wilbur answered by admitting execution of the note but denying the other material allegations of the petition. Doris admitted execution of the note, denied the other material allegations, raised certain affirmative defenses, and counterclaimed. One of the affirmative defenses and her counterclaim were based on allegations of the applicability of the ICCC and plaintiff's failure to give her a notice of right to cure. In her counterclaim she prayed for judgment of $7500 actual damages, a penalty of $100 to $1000, and an award of reasonable attorney fees and costs.
After trial, the court entered judgment against both defendants, but only Doris appealed. She contends the trial court erred in holding the ICCC did not apply to the transaction and in accordingly entering judgment on the note and denying her counterclaim.
I. Applicability of the ICCC. It is undisputed that the transaction in the present case did not have all the attributes necessary *153 to make it subject to the ICCC by force of the statute alone. For the ICCC to be applicable through its own terms, the transaction would have to be a "consumer loan" under section 537.1301(15). However, it was not a consumer loan because the debt was not "primarily for a personal, family, household or agricultural purpose" as required by section 537.1301(15)(a)(3).
If the ICCC is to apply in this case, it must do so because of language in the note which purports to make the transaction subject to it. In the body of the note is this provision: "This loan is subject to the provisions of the Iowa Consumer Credit Code applying to consumer loans." At the bottom of the note in boldface type is this statement: "This is a consumer credit transaction."
Unless displaced by particular provisions of the ICCC, ordinary principles of contract law supplement its provisions. § 537.1103. No provision of the ICCC purports to bar parties from adopting its terms by contract. Moreover, none of the purposes or policies of the ICCC would be infringed by permitting parties to do so. See § 537.1102(2). Allowing a creditor by contract to extend greater protections to a debtor than are provided by statute is consistent with the ICCC and principles of freedom of contract. We hold that the parties had the right to contract for applicability of the ICCC.
Moreover, we believe they did so in the present case. The note expressly provided that it was "subject to the provisions of the Iowa Consumer Credit Code applying to consumer loans" and that it was "a consumer credit transaction." Assuming, as the trial court held, the parties could not by contract make the transaction a consumer loan merely by applying that label to it, they did more than that here. They plainly agreed the transaction, whatever its label, would be subject to the ICCC.
The issue here is not one of interpretation. The parties have no dispute about the meaning of the words on the note. Rather, the dispute concerns their legal effect, an issue requiring construction of the contract. Construction of a contract is always a matter of law to be decided by the court. See Fashion Fabrics of Iowa, Inc. v. Retail Investors Corp., 266 N.W.2d 22, 25 (Iowa 1978); Connie's Construction Co. v. Fireman's Fund Insurance Co., 227 N.W.2d 207, 210 (Iowa 1975).
Aside from the language of the note, the only evidence of intention was testimony of plaintiff's president who said, "It's a matter of uniformity." Plaintiff contends a form of note suitable for consumer loans was used for convenience but without any intention to make the transaction subject to the ICCC.
Defendant does not invoke the parol evidence rule against the extrinsic evidence offered by plaintiff, and thus we do not decide the rule's applicability. However, the evidence does not relieve plaintiff from the effect of the language employed in the note which it supplied. The intention expressed in the instrument prevails over the secret intention of the drafter. Mopper v. Circle Key Life Insurance Co., 172 N.W.2d 118, 124 (Iowa 1969). Defendant is entitled to have the contract enforced. See Curran Hydraulic Corp. v. National-Ben Franklin Insurance Co., 261 N.W.2d 822, 825-26 (Iowa 1978).
Therefore we hold that the transaction is subject to the ICCC.
II. Consequences and remedy. Plaintiff concededly did not comply with relevant provisions of the ICCC before bringing the present action. A creditor who believes in good faith that a consumer is in default may give the consumer written notice of the alleged default and, "if the consumer has a right to cure the default, shall give the consumer the notice of right to cure provided in section 537.5111 before exercising any right he may have to enforce." § 537.5110(2). Defendant is among those entitled under section 537.5110(3) to notice of right to cure. The creditor may not take steps to enforce the obligation until twenty days after a proper notice of right to cure is given. § 537.5110(4)(a). The manner of *154 curing a default is explained in section 537.5110(4)(c). The form of notice is specified in section 537.5111.
Therefore the giving of a notice of right to cure was a condition precedent to suit. Lloyd's Plan, Inc. v. Brown, 268 N.W.2d 192, 195 (Iowa 1978) ("In most circumstances a creditor is barred from enforcing his rights upon consumer default unless he first gives the consumer a notice of right to cure."); see Northwest National Bank & Trust Co. v. Gutshall, 274 N.W.2d 713, 723 (Iowa 1979); cf. Herman Ford-Mercury, Inc. v. Betts, 251 N.W.2d 492, 495-96 (Iowa 1977) (proper notice to debtor of sale of repossessed collateral is a condition precedent to suit under article 9 of the UCC). Consequently defendant established her affirmative defense based on plaintiff's noncompliance with the ICCC. On that basis the trial court should have dismissed the petition without prejudice to plaintiff's right to enforce the alleged obligation after compliance with section 537.5110. Assuming a failure by defendant to cure the alleged default after being given the required notice, plaintiff may sue again on the claim. However, the present action was premature because of plaintiff's failure to follow the statute.
When a creditor violates section 537.5110, the consumer is entitled to actual damages, a penalty of $100 to $1000, reasonable attorney fees and costs, with exceptions not applicable here. § 537.5201(1), (8); Gutshall, 274 N.W.2d at 721. Therefore the trial court erred in entering judgment for plaintiff on defendant's counterclaim.
Defendant admits she did not prove actual damages. However, she is entitled to have the trial court assess the penalty, reasonable attorney fees and costs, as prayed in her counterclaim. She did not offer evidence at trial on the issue of reasonable attorney fees. Of course the court itself was an expert on that subject. Parrish v. Denato, 262 N.W.2d 281, 285 (Iowa 1978). However, we believe the statute contemplates litigation of the attorney fee issue in the adversary setting of the trial. Other than having observed the defense of the litigation, the court was not provided a basis for making an award. Upon remand, both parties should be given an opportunity for an evidentiary hearing on that issue, including the determination of attorney fees to be awarded defendant for prosecuting this appeal.
The case must be reversed and remanded for dismissal of plaintiff's petition without prejudice and an award of penalty, reasonable attorney fees and costs on defendant's counterclaim.
REVERSED AND REMANDED.
