Appeals (1) from an order of the Supreme Court (Connolly, J.), entered September 5, 2007 in Albany County, which granted defendant’s motion to dismiss the complaint, (2) from an order of said court, entered December 20, 2007 in Albany County, which, upon reargument, among other things, adhered to its prior decision, and (3) from a judgment of said court (Sise, J.), entered December 14, 2007 in Montgomery County, which dismissed petitioner’s application, in a proceeding pursuant to Judiciary Law § 475, to enforce a lien.
Defendant hired Integrated Property Services, Ltd. to obtain a reduction in its property tax assessments and authorized Integrated to hire counsel for that purpose. Integrated then hired plaintiff to initiate tax certiorari proceedings on defendant’s behalf. Initially, plaintiff and defendant entered into an agreement providing that plaintiff would be paid on an hourly basis. However, that agreement was subsequently replaced by a contingency fee agreement between plaintiff and Integrated, whereby plaintiffs fee would be based, among other things, on the amount by which defendant’s property taxes were reduced. Pursuant to a letter from Integrated to plaintiff accompanying the new agreement, all bills for legal services were to be directed to Integrated and not to defendant.
Plaintiff was discharged by defendant after some, but not all, *983of the legal work was completed and plaintiff transferred its file to the substituted attorney selected by defendant. When no legal fees were paid to plaintiff at the conclusion of the tax certiorari proceedings wherein defendant was awarded a reduction in its property taxes, plaintiff commenced an action to recover for legal services rendered. Defendant moved to dismiss claiming, among other things, that plaintiff failed to state a cause of action. By order entered September 5, 2007, Supreme Court (Connolly, J.) granted the motion. Plaintiff then moved to reargue. By order entered December 20, 2007, Supreme Court granted the motion to reargue, but adhered to its original decision dismissing the complaint. Plaintiff appeals from both orders.
Plaintiff also commenced a proceeding in Montgomery County, seeking to enforce a charging lien against defendant pursuant to Judiciary Law § 475. In a judgment entered December 14, 2007, Supreme Court (Sise, J.) dismissed the petition on the basis that recovery was barred by the doctrine of res judicata. Plaintiff also appeals from this judgment.
We first reject plaintiffs contention that Supreme Court erroneously dismissed its quantum meruit claim. To prevail on a quantum meruit cause of action, a plaintiff must establish, among other things, an expectation of compensation (see Clark v Torian, 214 AD2d 938, 938 [1995]; Precision Founds, v Ives, 4 AD3d 589, 591-592 [2004]). Here, the documentary evidence established that plaintiff did not have an expectation of payment from defendant. Although plaintiff and defendant initially entered into an hourly fee agreement in July 2000, that agreement was superceded in September 2000 by a contingency fee agreement between plaintiff and Integrated which specifically provided that plaintiff would look to Integrated, not to defendant, for payment. In fact, the hourly fee agreement expressly indicates that the remaining terms of defendant’s agreement with Integrated were still being negotiated, suggesting that the initial agreement between plaintiff and defendant was understood to be transitional in nature.
Furthermore, although the terms of a cancelled retainer agreement are not the only evidence of the intent of the parties, they may be “taken into consideration as a guide for ascertaining quantum meruit” (Matter of Tillman, 259 NY 133, 135 [1932]). Thus, Supreme Court’s reliance on the September 2000 agreement was entirely proper, as there is no record evidence that demonstrates, in contradiction of the September 2000 agreement, that plaintiff entered into the representation expecting payment directly from defendant. Therefore, even constru*984ing, as we must, “the complaint liberally in plaintiff’s favor [and] accepting] the facts alleged as true” (Quail Ridge Assoc. v Chemical Bank, 162 AD2d 917, 918 [1990], lv dismissed 76 NY2d 936 [1990]; see CPLR 3211; Morone v Morone, 50 NY2d 481, 484 [1980]; Carp v Marcus, 112 AD2d 546, 546 [1985]), except as to those facts which are “flatly contradicted by documentary evidence” (Quail Ridge Assoc, v Chemical Bank, 162 AD2d at 918), we conclude that Supreme Court correctly found a lack of privity between the parties and dismissed the action.
We similarly find unavailing plaintiffs argument that its petition seeking a charging lien should not have been dismissed because the issue of its charging lien was not before Supreme Court in the earlier action to recover legal fees. It is well settled that “[r]es judicata will bar litigation of a claim that was either raised, or could have been raised, in a prior action provided that the party to be barred had a full and fair opportunity to litigate any cause of action arising out of the same transaction and the prior disposition was a final judgment on the merits” (Kinsman v Turetsky, 21 AD3d 1246, 1246 [2005], lv denied 6 NY3d 702 [2005]; see Lanuto v Constantine, 215 AD2d 946, 947 [1995]; see also McDonald v Lengel, 2 AD3d 1182, 1183 [2003]). Here, plaintiff could have sought a charging lien in the action. Therefore, the effect of dismissal of that action was to bar “all other claims arising out of the same transaction or series of transactions . . . , even if based upon different theories or if seeking a different remedy” (O’Brien v City of Syracuse, 54 NY2d 353, 357 [1981]).
We have considered the parties’ remaining contentions and find them to be either academic or unpersuasive.
Mercure, J.E, Spain, Carpinello and Malone Jr., JJ., concur. Ordered that the orders and judgment are affirmed, with costs.