Plaintiff, a lumber supplier, appeals from a judgment rejecting its attempt to foreclose four construction liens it held on property owned and developed by defendant Tran Co. The trial court found that Tran Co. had paid plaintiff, albeit indirectly, for the material on which plaintiffs claim is based. Plaintiff appeals, and we affirm.
Because defendant Tran Co. prevailed on an affirmative defense that was legal in nature — payment of the debt underlying the foreclosure — we review for errors of law and, with respect to facts, for whether there is any evidence to support them. Illingworth v. Bushong, 297 Or 675, 694, 688 P2d 379 (1984); T. M. Peet Enterprises, Inc. v. Plaia, 131 Or App 153, 155, 883 P2d 1329 (1994).
Defendant Tran Co. owned four lots in a subdivision near Salem and contracted with Bill Stanley Homes (Stanley)1 to build houses on those properties. In the course of construction, Stanley purchased lumber from plaintiff on credit. Plaintiff billed Stanley separately for each job site. Stanley would, on a somewhat monthly basis, present to defendant the recent bills from plaintiff, along with one check to plaintiff drawn on Stanley’s own bank account for each of the four projects, made out to plaintiff in the amount necessary to cover the purchases for that project. Defendant’s employees then compared the bills from plaintiff with the amounts of the Stanley checks to ensure that the amounts matched and, when they did, forwarded the Stanley checks to plaintiff. Defendant then issued checks drawn on its own account payable to Stanley in the amount Stanley had paid plaintiff. In other words, Stanley paid plaintiff and was then reimbursed by defendant, after defendant assured itself that the amount Stanley paid was exactly what Stanley owed plaintiff for materials used on defendant’s projects.
Plaintiff claimed at trial that none of the Stanley checks it received contained any indications from defendant *282as to which job site it applied and therefore plaintiff was not required to credit those payments to defendant’s four job site accounts. Rather, under a contract with Stanley, plaintiff was entitled to apply those payments to Stanley’s overdue account balances incurred on other projects. Thus, according to plaintiff, defendant had provided no payment on accounts owed for its job sites, thereby justifying plaintiff’s construction liens.
Defendant, on the other hand, presented evidence that the Stanley checks forwarded to plaintiff had either tear-off stubs identifying the project to which they should be applied or, on checks that were not accompanied by a tear-off stub, a written indication on the face of the check with that same information. That testimony is corroborated by evidence in the record, namely, photocopies of checks with their associated check stubs clearly indicating the project to which they applied, as well as photocopies of other checks with no check stub but with handwritten project addresses on the checks’ face. Only one check contains neither an associated stub nor handwritten notation indicating for which job site it was an intended payment. Based on this documentary evidence, the trial court found that “plaintiff knew, or reasonably should have known, that the payments were intended to be applied against the cost of material supplied to the four construction sites involved in this lawsuit.”
On appeal, plaintiff first challenges the admissibility of the checks issued by Stanley to plaintiff. Plaintiff argues that, because the Stanley checks were not issued by defendant, they are not relevant to the affirmative defense that defendant “has paid for all or a substantial portion of the labor and materials allegedly provided by Plaintiff.” Plaintiff, in other words, would have this court hold defendant to a hyper-precise reading of its pleading, such that the assertion that “Tran Co. has paid” plaintiff must mean only that Tran Co. has directly paid plaintiff, and not that Tran Co. has provided the money with which Stanley paid plaintiff. Defendant responds that whether it paid plaintiff directly by means of its own checks or indirectly through Stanley is immaterial; in either case, plaintiff received payment, traceable to defendant, for materials plaintiff provided for use on defendant’s properties, and therefore the Stanley checks are relevant to the affirmative defense.
*283We agree. Defendant’s theory of the case is that it used elaborate procedures to ensure that moneys it paid to Stanley by reimbursing Stanley for payments to plaintiff were used only to pay for materials supplied for use on defendant’s properties. Those procedures included verification that Stanley’s checks to plaintiff and defendant’s checks to Stanley were issued only in the amount of bills for materials used on defendant’s projects. Given that theory, the Stanley checks were undeniably relevant to the issue of whether plaintiff received payment ultimately traceable to defendant for materials supplied to defendant’s properties. Hilker v. Kruse, 152 Or 197, 52 P2d 1119 (1936) (plaintiffs acceptance of payment from third party admitted as evidence of payment); T. M. Pete Enterprises, Inc., 131 Or App at 156-57 (admitting evidence of payments on separate contract relevant to whether those monies “were, in fact, paid on this contract”).
Further, to the extent that defendant’s proof does not precisely match the wording of its affirmative defense, the difference is immaterial and not prejudicial. See ORCP12 B (“The court shall, in every stage of an action, disregard any error or defect in the pleadings * * * which does not affect the substantial rights of the adverse party.”). Defendant pled that it paid plaintiff; its evidence showed that plaintiff was paid by means of checks issued by Stanley out of funds provided by defendant for the purpose of paying defendant’s accounts. Plaintiff did not argue that it was misled or prejudiced in its ability to present its case as a result of that variance, nor do we see any basis for such an argument. City of Lake Oswego v. $23,232.23 in Cash, 140 Or App 520, 525-26, 916 P2d 865, rev den 324 Or 322 (1996). The trial court did not err in admitting the Stanley checks as proof of payment.
On the merits, plaintiff argues that the trial court used the wrong legal standard in concluding that plaintiff had to direct payments to the accounts associated with defendant’s properties, instead of to Stanley’s unrelated preexisting debt, if plaintiff knew or should have known that the funds were directed to the specific accounts; plaintiff contends that it had responsibility only with respect to payments with directions of which it had actual knowledge. Plaintiff also argues that defendant failed to prove that plaintiff had such knowledge. We conclude, however, that the trial court’s *284standard, “knew or should have known,” is correct and that plaintiff in fact did know or should have known how to credit the payments.
A debtor may direct that a given payment be applied to a particular account, and a creditor is obligated to apply such a payment as directed. Gayer and Gayer, 326 Or 436, 952 P2d 1030 (1998); Empire Building Supply v. EKO Investments, 40 Or App 739, 744-45, 596 P2d 593 (1979). When the direction is on the face of a check, that direction must be sufficiently specific to provide the creditor (and a reviewing court) with information from which it can determine how to make the application. See Block v. Love et al., 136 Or 685, 692, 1 P2d 588 (1931) (direction ineffective where a check referenced two different accounts but did not specify distribution or priority between them).
Effective direction to a specific debt may take the form of express instructions or it may be inferred from circumstances manifesting the debtor’s intent:
“A debtor who chooses to direct payment to a particular debt must manifest to the creditor an intent to do so ‘at or before the time of payment.’ Johnson Lbr. Corp. v. Leonard et al., 192 Or 639, 668-69, 236 P2d 926 (1951) (quoting Restatement of the Law, Contracts, § 387); Block v. Love, 136 Or 685, 692, 1 P2d 588 (1931) (same) (citations omitted). The debtor’s intent need not be manifested in express words, but may be deduced from acts and other circumstances. Johnson, 192 Or at 670 (citing Restatement of Contracts, § 387, comment e).” Gayer, 326 Or at 443.
The Restatement (Second) of Contracts § 258(2) (1981) further addresses the particular situation faced by the parties here:
“If the obligor is under a duty to a third person to devote a performance to the discharge of a particular duty that the obligor owes to the obligee and the obligee knows or has reason to know this, the obligor’s performance is applied to that duty.” (Emphasis added.)
We believe that this rule correctly states the relevant standard; we perceive no reason why a debtor who takes measures that would alert a reasonable creditor as to how a payment should be applied should be held responsible if the *285creditor fails to do so. Thus, in the dispute here, if plaintiff (the obligee) knew or had reason to know that Stanley (the obligor) had a duty to pay plaintiff (the obligee) on defendant’s (the third party’s) account, as opposed to Stanley’s own account, then plaintiff had to apply the Stanley checks (the obligor’s performance) so as to discharge Stanley’s duty to defendant. We therefore conclude that the trial court did not err in holding plaintiff responsible for applying to defendant’s projects those checks it “knew or reasonably should have known” were intended as payment on them.
The dispositive issue thus narrows to this: Is there any evidence to support the trial court’s finding that plaintiff “knew, or reasonably should have known” that the Stanley checks were intended in payment of the debts underlying these liens and therefore that plaintiff was “paid in full”? We conclude that there is. All but one of the Stanley checks in evidence referenced a specific street address, either on the face of the check or on a tear-off stub attached to the check when mailed to plaintiff. Indeed, plaintiffs finance manager admitted on cross-examination that such identification was sufficiently specific to identify the account to which the check should be applied. The one check on which there is no such explicit direction was issued in the precise amount then outstanding on one of the four properties, had prior payments been properly credited. “In the absence of a contrary indication, the coincidence of the amount of the payment and that of one of the debts sufficiently manifest * * * [the debtor’s] intention that the payment be applied to * * * [that particular] debt.” Restatement (Second) of Contracts § 258, illus 6. Defendant’s employees testified that they personally compared Stanley checks against plaintiffs invoices prior to mailing them to ensure that they identified the account for which they were intended in payment and were in the proper amounts. Finally, there is evidence that the Stanley checks mailed to plaintiff, if properly credited to the account indicated, covered all charges for materials delivered to the four properties at issue. That evidence supports the trial court’s conclusion that plaintiff was paid in full for materials supplied to these four properties. The trial court did not err in denying foreclosure.
*286On appeal, plaintiff raises an additional argument not properly preserved below: plaintiff claims that, even if all checks in evidence are credited to the appropriate accounts, an outstanding unpaid balance remains on each account. Evidently, that “unpaid balance” represents finance charges for overdue accounts assessed in the fall of 1997, long after many of the Stanley checks were cashed and should have been properly credited. Defendant argues that it is not responsible for such finance charges because under plaintiffs own billing practices, had plaintiff properly applied payments when received, no finance charges would have accrued. We need not decide that issue, however, as plaintiff raised its “unpaid balance” argument for the first time in its post-judgment motion to clarify the judgment. In response to that motion, the trial judge expressly noted that plaintiffs belated attempt to recover the alleged “unpaid balance” raised a factual issue — the amount of the debt — that was resolved at trial.
As its final assignment of error, plaintiff asserts that the trial court erred in awarding attorney fees to defendant as the prevailing party under ORS 87.060(5). That argument has no merit in light of our holding that the trial court did not err in denying the foreclosure claims.
Affirmed.
Stanley and others were named defendants in the original foreclosure actions, but Stanley defaulted and the others were dismissed before trial. Only the claim against Tran Co. is on appeal. “Defendant” in the remainder of this opinion refers only to Tran Co.