
82 So.3d 950 (2011)
D. Max SHEPPARD and Alicia L. Sheppard, Appellants,
v.
M & R PLUMBING, INCORPORATED, a Florida Corporation, Appellee.
No. 1D10-4551.
District Court of Appeal of Florida, First District.
August 4, 2011.
*951 Bruce Brashear of Brashear, Marsh & McCarty, P.L., Gainesville, for Appellants.
Peter A. Robertson and Kristin Davis of the Robertson Firm, Gainesville, for Appellee.
BENTON, C.J.
Max and Alicia Sheppard appeal the trial court's order requiring them to pay costs and attorneys' fees to M & R Plumbing, Inc. (M & R) on the purported authority of section 713.29, Florida Statutes (2008). We affirm the costs award, but reverse the award of attorneys' fees.
The parties' dispute over costs and fees is ancillary to a dispute that arose *952 in connection with M & R's installation of a water treatment system on the Sheppards' property. The Sheppards eventually removed the system M & R had installed, and replaced it with another, less elaborate system they found more satisfactory. In the main case, M & R's complaint[1] alleged that the parties had reached a verbal agreement which the Sheppards had breached, and sought to foreclose a construction lien that M & R alleged had arisen under the Construction Lien Law. In the alternative, M & R alleged it was entitled to be compensated on a quantum meruit basis for labor, services and materials it had provided the Sheppards.[2]
At the trial in the main case, the jury found no verbal agreement had been reached, but that M & R had, in installing the water treatment system, conferred a benefit on the Sheppards of the kind a reasonable person would expect to pay for, and put the value of the labor and material at $13,155. A contract implied in lawthe basis for M & R's recovery in the main caseis not a true contract, and a lien does not arise where nothing more than a contract implied in law is proven. See Doug Hambel's Plumbing, Inc. v. Conway, 831 So.2d 704, 705 (Fla. 4th DCA 2002) (citing CDS & Assocs. of the Palm Beaches, Inc. v. 1711 Donna Rd. Assocs., 743 So.2d 1223 (Fla. 4th DCA 1999)). When the trial court entered final judgment on the verdict in favor of M & R, it expressly reserved jurisdiction to consider an award of attorneys' fees and costs.[3]
All parties filed motions seeking attorneys' fees, both sides relying on section 713.29, Florida Statutes (2008), which provides:
In any action brought to enforce a lien... under this part, the prevailing party is entitled to recover a reasonable fee for the services of her or his attorney....
§ 713.29, Fla. Stat. (2008). The trial court ruled that M & R was entitled to attorneys' fees under section 713.29 on the lien foreclosure count.
In a lawsuit for money damages, authorization for "attorneys' fees can derive only from either a statutory basis or an agreement between the parties." Trytek *953 v. Gale Indus., Inc., 3 So.3d 1194, 1198 (Fla.2009) (citing State Farm Fire & Cas. Co. v. Palma, 629 So.2d 830, 832 (Fla. 1993)). Here the trial court concluded that section 713.29 provided statutory authority for an award of attorneys' fees, premised on a ruling that M & R had prevailed on its lien foreclosure claim. The trial court evidently rejected the Sheppards' position thatgiven the jury's verdictthey had prevailed on the construction lien foreclosure claim, entitling the Sheppards to recover fees, as prevailing parties.
In the absence of proof of a valid contract, finding M & R entitled to an award of attorneys' fees pursuant to section 713.29 was error. "Under Florida law, a construction lien can arise only when a valid contract exists between the parties." Niehaus v. Big Ben's Tree Serv., Inc., 982 So.2d 1253, 1254 (Fla. 1st DCA 2008). The jury found that the parties did not enter into a verbal contract, or otherwise reach agreement on all material terms.[4] A quantum meruit claim may support a construction lien only if a contract implied in fact is alleged and proven. See Hambel's Plumbing, 831 So.2d at 705-06. No contract implied in fact was pleaded in the present case, and the evidence failed to persuade the jury that a meeting of the minds occurred.
The jury's verdict that no contract had in fact been entered into bound the trial court on the equity side no less than on the law side. See Paoli v. Natherson, 732 So.2d 486, 488 (Fla. 2d DCA 1999) ("When a jury decides fact issues in an action at law, and the issues are sufficiently similar to the fact issues in a related equitable claim, the trial court is bound by the jury's findings of fact when it then rules on the equitable claim."). The trial court's conclusion that M & R "proved the existence of a contract implied in fact" cannot be squared with the jury's verdict. "For a contract to exist, the parties must reach agreement as to the meaning of each material term." Niehaus, 982 So.2d at 1254. See also Jacksonville Port Auth., City of Jacksonville v. W.R. Johnson Enters., Inc., 624 So.2d 313, 315 (Fla. 1st DCA 1993) ("[I]f there has been no agreement as to essential terms, an enforceable contract does not exist.... Failure to sufficiently determine quality, quantity, or price may preclude the finding of an enforceable agreement.").
The trial court erred in determining M & R was entitled to an award of attorneys' fees under section 713.29, because, without a valid contract, there was no lien for M & R to foreclose. A contract implied in law, also called a quasi contract,[5] is merely a legal fiction "adopted to provide a remedy where one party was *954 unjustly enriched, where that party received a benefit under circumstances that made it unjust to retain it without giving compensation." Commerce P'ship 8098 Ltd. P'ship v. Equity Contracting Co. Inc., 695 So.2d 383, 386 (Fla. 4th DCA 1997) (citing Tipper v. Great Lakes Chem. Co., 281 So.2d 10, 13 (Fla.1973); Variety Children's Hosp. v. Vigliotti, 385 So.2d 1052, 1053 (Fla. 3d DCA 1980)).
But we reject the Sheppards' argument thathaving successfully resisted enforcement of an alleged lienthey are entitled to recover attorneys' fees. While we agree the Sheppards must now be deemed the prevailing parties on the lien foreclosure count, entry of the money judgment in favor of M & R on the quantum meruit count made M & R, not the Sheppards, the prevailing party in the litigation, viewing the entire "action brought" as a whole. § 713.29, Fla. Stat. (2008). See Trytek, 3 So.3d at 1203-04; Prosperi v. Code, Inc., 626 So.2d 1360, 1362-63 (Fla. 1993).
As the "party recovering judgment," moreover, M & R was entitled to costs. § 57.041, Fla. Stat. (2010). See generally Hendry Tractor Co. v. Fernandez, 432 So.2d 1315, 1316 (Fla.1983) ("The statute expressly demands that the party recovering judgment be awarded costs. This unambiguous language need not be construed. Rather, it should be applied as is to the given situation."); Bessey v. Difilippo, 951 So.2d 992, 996 (Fla. 1st DCA 2007) (same).
Affirmed in part and reversed in part.
PADOVANO and WETHERELL, JJ., concur.
NOTES
[1]  Presented with a $19,925.00 invoice, the Sheppards filed suit against M & R for declaratory judgment, whereupon M & R filed its own three-count complaint against the Sheppards. M & R's separate lawsuit was then consolidated with the action for declaratory judgment the Sheppards had earlier filed seeking a ruling that M & R's claim for $19,925 lacked merit.
[2]  M & R's quantum meruit count alleged a contract implied in law, but not a contract implied in fact. While a construction lien cannot arise from a contract implied in law, it can arise from a contract implied in fact. A contract implied in fact requires actual agreement and results in a valid, enforceable contract. See Doug Hambel's Plumbing, Inc. v. Conway, 831 So.2d 704, 705 (Fla. 4th DCA 2002); CDS & Assocs. of the Palm Beaches, Inc. v. 1711 Donna Rd. Assocs., 743 So.2d 1223, 1224 (Fla. 4th DCA 1999). "A contract implied in fact is . . . based on a tacit promise, one that is inferred in whole or in part from the parties' conduct, not solely from their words.... [A] fact finder must examine and interpret the parties' conduct to give definition to their unspoken agreement. It is to this process of defining an enforceable agreement that Florida courts have referred when they have indicated that contracts implied in fact `rest upon the assent of the parties.'" Commerce P'ship 8098 Ltd. P'ship v. Equity Contracting Co., 695 So.2d 383, 385 (Fla. 4th DCA 1997) (citations omitted).
[3]  On the separate appeal in the main case, we affirmed the judgment in favor of M & R. See Sheppard v. M & R Plumbing, Inc., 1D10-2442, 65 So.3d 1059 (Fla. 1st DCA 2011). The present proceeding is a separate appeal from the award of fees and costs. See generally Westgate Miami Beach, LTD. v. Newport Operating Corp., 55 So.3d 567, 572 (Fla.2010).
[4]  At trial, Dr. Sheppard testified he was quoted an initial price of $3,100 for the water treatment system. Mr. McCullors, owner of M & R, testified that he quoted the Sheppards an initial price of $31,500. The evidence established that when the materials for the system were delivered, the Sheppards questioned the extensive amount of materials. The parties then arguably agreed on a smaller system, but there was no evidence of any discussion between the parties with regard to the price of the scaled down version. The jury did not find that the parties initially agreed to either $3,100 or $31,500, and there was no evidence the parties ever reached agreement on the price of the cost of the revised system.
[5]  "The elements of a cause of action for a quasi contract are that: (1) the plaintiff has conferred a benefit on the defendant; (2) the defendant has knowledge of the benefit; (3) the defendant has accepted or retained the benefit conferred and (4) the circumstances are such that it would be inequitable for the defendant to retain the benefit without paying fair value for it." Commerce P'ship, 695 So.2d at 386 (citing Hillman Constr. Corp. v. Wainer, 636 So.2d 576, 577 (Fla. 4th DCA 1994); Henry M. Butler, Inc. v. Trizec Props., Inc., 524 So.2d 710, 711-12 (Fla. 2d DCA 1988)).
