When an earnest money agreement unequivocally designates a sum deposited as “earnest money,” and the agreement unambiguously provides that the same sum is “for the purpose of binding the purchaser to the agreement,” then the definitional requirements of state statute are met and the inquiry with regard to remedy becomes one of the amount of the deposit in relation to the purchase price. Here, the total deposits properly considered “earnest money” exceed five percent of the purchase price, thus permitting the sellers to pursue their remedies for specific performance and damages rather than being limited to forfeiture of the earnest money. The trial court’s determination to the contrary is reversed.
In 1993, Consumers Choice, Inc. (CCI) wanted to develop a new supermarket in Bellingham and began to assemble the necessary parcels of land. CCI found three contiguous parcels suitable and, through an agent, began negotiations with the different owners for purchase or lease of them. CCI and the owners of one parcel, Richard and Marlene Meyer and LeRoy and Ginny Johnson, executed a real estate purchase and sale agreement on October 14, 1993, for a price of $381,150. The agreement is an integrated contract which contains the regular real estate purchase and sale agreement form and several addenda.
The form agreement provided in pertinent part:
28. DEFAULT AND ATTORNEY’S FEES. If the following conditions are met, and the Buyer fails, without legal excuse (grounds) to complete the purchase of the property, the earnest money deposit made by the Buyer shall be forfeited to the Seller as the sole and exclusive remedy available to the Seller for such failure:
(1) The earnest money does not exceed 5% of the purchase price.
*878(2) If Buyer is purchasing the property primarily for personal, family or household purposes, Buyer and Seller must initial here for the above cause to apply:
N/A / N/A /
Sellers Buyers
If both the above conditions are not met, and Buyer fails, without legal excuse (grounds), to complete the purchase of the property, Seller shall have the option to either: (a) Retain the earnest money as liquidated damages, (b) Collect actual damages, or (c) Obtain specific performance together with any incidental damages.
If Buyer, Seller or Agent institutes suit under this Agreement, the prevailing party is entitled to court costs and a reasonable attorney’s fee. In the event of trial the amount of the attorney’s fee shall be fixed by the court. The venue of any suit shall be the county in which the property is located.
The heart of the dispute is whether the earnest money was $10,000 or $25,000. A $10,000 earnest money deposit was paid at signing. The payment granted the buyer a six-month feasibility period to expire April 14, 1994. When and if the contingency was waived, the buyer was required to deposit an additional $15,000 of “earnest money,” and this earnest money payment then obligated the parties to close by the closing date as originally set forth in the contract. The payment of this $15,000 did not extend the closing date. Closing was to be within one year of the signing, thus, on or before October 14, 1994.
By April 1994, CCI waived the feasibility contingency and deposited the additional $15,000 of “earnest money,” binding it to the real estate purchase and sale agreement. Believing that it might be necessary to obtain a shoreline substantial development permit to construct a supermarket on the site, CCI requested an option of extending the closing date beyond October 14, 1994, for up to one year if, and only if, the shoreline permit had not yet been obtained. *879After further negotiation, the parties agreed that CCI would pay an additional $25,000 in nonrefundable “earnest money.” The money was to apply to the purchase price, but the purchase price was also increased by the same $25,000. Closing was to take place upon the earlier happening of one of two events: obtaining the shoreline permit or a new closing date of October 14, 1995, whether the permit issued or not. As it happened, the shoreline substantial development permit was obtained in July or August of 1994 from the City of Bellingham and the State. Although that permit was granted and CCI applied for no other permits, CCI deposited the additional $25,000 stating it was exercising its right to extend the closing date to October 14, 1995, or until the permit was issued, whichever was first. Counsel for the sellers refused to extend this date because the permit had issued. Closing did not occur and in November of 1994 CCI was purchased by Thrifty Foods. Neither CCI nor Thrifty Foods ever attempted to close this transaction and the project was abandoned.
The Meyers and Johnsons claim that CCI’s refusal to close resulted in a major lost economic opportunity exceeding the earnest money deposit which CCI now is willing to forfeit as its sole liability. The sellers argue that because CCI refused to go through with the purchase the value of the property has been substantially reduced and they have suffered damages due to lost business opportunities.
On August 9, 1995, the Meyers and Johnsons filed a complaint for specific performance and damages. CCI filed a motion for summary judgment which the trial court granted, dismissing with prejudice the Meyers’ and the Johnsons’ claims for specific performance and damages, and determining that CCI, as the prevailing party, was entitled to recover its attorney fees and costs. The trial court held as a matter of law that there was only $10,000 of earnest money. The trial court recognized that the $15,000 was denominated “earnest money,” but found it to be “something else” paid for an extension of the closing date. The court also held that because the $10,000 was less *880than five percent of the sales price, any remedy other than the liquidated damages provided under the agreement was unavailable.
When a written, integrated contract, considered as a whole, is clear and unambiguous on its face, “[i]t is the duty of the court to declare the meaning of what is written, and not what was intended to be written.”1
Under RCW 64.04.005, forfeiture of the earnest money is the exclusive remedy only if the earnest money does not exceed five percent. This agreement conforms to the statute. The definition section of the statute, RCW 64.04.005(4), defines earnest money deposit as follows:
For purposes of this section, “earnest money deposit” means any deposit, deposits, payment, or payments of a part of the purchase price for the property, made in the form of cash, check, promissory note, or other things of value for the purpose of binding the purchaser to the agreement and identified in the agreement as an earnest money deposit, and does not include other deposits or payments made by the purchaser.
The statute recognizes that earnest money may be paid in more than one payment or deposit. The statute also requires that the payment or deposit be identified in the agreement as an earnest money deposit.
The parties here stated that if the feasibility study was approved by the buyer then it would deposit an additional $15,000 nonrefundable earnest money to be disbursed to the sellers immediately, and in consideration of this money the buyer would have until October 14, 1994 to secure and close the transaction. This did not extend the original period for closing. The agreement further provided that all nonrefundable earnest money was to be applied to the purchase price if the sale closed.
Neither party disputes that the initial payment of *881$10,000 was “earnest money.” In our view, under the circumstances and contract language here, the additional $15,000 in “earnest money” actually bound the purchaser to the agreement. Contrary to the decision of the trial court and the argument of CCI, this amount can be nothing other than “earnest money” just as it is clearly so denominated in this purchase and sale agreement.
CCI claims that its intent was that the original agreement included a $10,000 earnest money as a “conditional right to purchase the plaintiffs’ property, in effect an option to purchase.” If CCI then elected to go through with the purchase, it would pay a $15,000 “extension payment.” The problem with this argument is that the payment of the additional $15,000 was what bound CCI to go through with the sale and close by the original closing date. It “extended” nothing. Although it might be unusual that after six months CCI could have said “no deal” and left the transaction minus its $10,000 as liquidated damages to the sellers, it was not until it paid the additional $15,000 earnest money that CCI was committed to close.
CCI also argues that extension payments are not treated as earnest money deposits for purposes of determining the enforceability of liquidated damages clauses in purchase and sale agreements.2 This is true, but CCI’s argument presupposes that the additional $15,000 was an “extension payment,” an argument that is not supported by the contract or the statute. The additional $15,000 denominated as “earnest money” fits the statutory definition of earnest money. The trial court erred in granting summary judgment for CCI.
Paragraph 28 of the purchase and sale agreement provides that the prevailing party is entitled to attorney fees and costs. Because we determine as a matter of law that the full $25,000 paid was “earnest money,” the Meyers and the Johnsons are entitled to their reasonable attorney fees for this appeal. However, because further *882proceedings are necessary, we remand the issue of the amount of such fees to the trial court for consideration in the context of the overall fee award to the prevailing party after trial.
We reverse the trial court’s order on summary judgment including the award of attorney fees to CCI.
Agid and Cox, JJ., concur.
J.W. Seavey Hop Corp. v. Pollock, 20 Wn.2d 337, 349, 147 P.2d 310 (1944) (quoted with approval in Berg v. Hudesman, 115 Wn.2d 657, 669, 801 P.2d 222 (1990)). See also Max L. Wells Trust v. Grand Cent. Sauna & Hot Tub Co., 62 Wn. App. 593, 602, 815 P.2d 284 (1991).
Wallace Real Estate Inv., Inc. v. Groves, 124 Wn.2d 881, 895, 881 P.2d 1010 (1994).