
661 So.2d 1239 (1995)
Timothy E. PAYNE, for himself and all others similarly situated, Appellant,
v.
HUMANA HOSPITAL ORANGE PARK, a Florida corporation, Appellee.
No. 93-4059.
District Court of Appeal of Florida, First District.
October 12, 1995.
*1240 Stephen A. Scott of Law Offices of Stephen A. Scott, Gainesville and Herbert T. Schwartz of Sullins, Johnston, Rohrbach & Magers, Houston, TX, for Appellant.
Edward M. Waller, Jr. of Fowler, White, Gillen, Boggs, Villareal & Banker, P.A., Tampa, for Appellee.

ON MOTION FOR REHEARING
PER CURIAM.
We grant appellee's motion for rehearing, withdraw our opinion of July 3, 1995, and substitute the following opinion in its place. We however reach the same result as that previously reached.
The trial court dismissed two counts of the class-action[1] complaint of Timothy E. Payne (Payne) against Humana Hospital of Orange Park (Humana). The court determined that the counts failed to state a cause of action. We reverse.
Humana, now operating as Galen of Florida, Incorporated, provided services to Payne on four occasions: August 16, 1990; November 19, 1990; December 14, 1990; and January 18, 1991. Payne's complaint asks in count one for a declaratory judgment regarding his unpaid hospital bills, and asks in count two for the return of money had and received on his paid bills. The complaint alleges that Humana charged Payne and similarly situated persons unreasonable sums for pharmaceuticals, medical supplies, and laboratory services.
We begin by observing that all material factual allegations of the complaint must be taken as true for purposes of a motion to dismiss. Varnes v. Dawkins, 624 So.2d 349 (Fla. 1st DCA 1993). The trial court moreover may not consider possible affirmative defenses in ruling upon the motion to dismiss. Id.
Payne bases his count for money had and received on the theory of "imposition." The Florida Supreme Court tells us that, when money is obtained through imposition, a count for money had and received is applicable. Cullen v. Seaboard Air Line R.R. Co., 63 Fla. 122, 58 So. 182 (1912). The court says:
A common count for money payable to the plaintiff for money had and received by the defendant for the use of the plaintiff is applicable in all cases where the defendant has obtained money which, ex aequo et bono, he ought to refund. This action to recover money which ought not in justice be kept lies for money paid by mistake or upon consideration which has failed, or for money obtained through imposition. .. . The gist of the action is that the defendant, upon the circumstances of the case, is obliged by the ties of natural justice to refund the money.
A count for money had and received may be proved by any legal evidence, showing that the defendant has possession of the money of the plaintiff, which in equity and good conscience he ought to pay over.

*1241 Cullen, 63 Fla. at 129, 58 So. at 184 (citation omitted) (emphasis added). The court explains the meaning of "imposition":
Where a person taking advantage of his position, or the circumstances in which another is placed, exacts a greater price for services rendered than is fair and reasonable, where such a compensation only is allowable, the exaction of the unreasonable price for the service rendered may be said to be an imposition... .
Southern States Power Co. v. Ivey, 118 Fla. 756, 760, 160 So. 46, 47 (1935) (emphasis added). Payne's imposition action thus begs the question whether only reasonable compensation is allowable.
A patient may not be bound by unreasonable charges in an agreement to pay charges in accordance with "standard and current rates." Mercy Hosp. v. Carr, 297 So.2d 598, 599 (Fla. 3d DCA 1974). When a contract fails to fix a price furthermore, a reasonable price is implied.[2]See F.L. Stitt & Co. v. Powell, 94 Fla. 550, 556, 114 So. 375, 378 (1927) (holding that, where a contract for legal services fails to expressly provide for the amount of the fee, a "reasonable" fee is implied); McGill v. Cockrell, 88 Fla. 54, 58, 101 So. 199, 201 (1924) (where a contract fixes no definite sum to be paid for services, "a reasonable sum is presumed by law to have been contemplated by the parties"); cf. 19A Fla. Stat. Ann. 218 (1993) (§ 672.305(2): "A price to be fixed by the seller or by the buyer means a price for him to fix in good faith."), cmt. at 219 ("This seemingly unnecessary admonition was included to deny to the seller the unbridled license to fix any exorbitant or unreasonable price he may wish."). Humana thus is limited to reasonable compensation.
The instant complaint alleges that, instead of fair or reasonable compensation, "unreasonable, unconscionable, and excessive" charges were exacted. Payne's allegations must be taken as true for purposes of the motion to dismiss. The complaint therefore states a cause of action.
Humana nevertheless argues that its contract with Payne requires the payment of "prevailing rates" and "regular charges," and therefore the contract itself precludes the instant cause of action. This court however directs that:
In order to state a cause of action, a complaint need only contain a short and plain statement as to the ultimate facts which indicate that the pleader is entitled to relief. The court must assume that all of the facts alleged in the complaint are true and must draw all reasonable inferences in favor of the pleader. Further, the complaint need not anticipate affirmative defenses. Any defenses should be stated by the defendants in an answer so that issues can be drawn. In short, if the pleader alleges the necessary elements of the cause of action, the complaint states a cause of action.
Shahid v. Campbell, 552 So.2d 321, 322 (Fla. 1st DCA 1989) (citations omitted) (emphasis added). Humana's argument thus is properly raised in an answer, rather than in a motion to dismiss.
Humana also argues that the express terms of the instant contract may not be overridden to imply a reasonableness requirement. Humana relies on Riedel v. NCNB Nat'l Bank, 591 So.2d 1038 (Fla. 1st DCA 1991) (affirming the dismissal of a complaint because the defendant's actions were specifically authorized by the parties' contract, and holding that the complaint failed to state a UCC cause of action because the UCC's duty of good faith may not be imposed to override the express terms of a contract). Riedel is distinguishable; Reidel's contract's cost-collateralization clause expressly permitted the bank's retention of stock collateral pledged on a personal line of credit. The instant contract, by contrast, fails to express prices within the four corners of the contract. It is a fact in dispute moreover whether the contract sets a price at all.
Humana also argues that where a contract provision sets a method by which the price may be ascertained, the contract is enforceable. *1242 Humana relies on Blackhawk Heating & Plumbing Co. v. Data Lease Fin. Corp., 302 So.2d 404 (Fla. 1974) (reversing the denial of specific performance because the contract was sufficiently specific to be enforceable: the term "cash-flow benefit," in which the optionee was to share proportionately in the calculation of payments due on the exercise of an option, was not so indefinite as to be unenforceable, and the failure of the parties to agree on an amount of money to be paid upon the exercise of an option, especially where the defendant refused to allow review of its books and records, did not preclude the option from being exercised). Blackhawk is inapposite; it was based on an enforcement action, not a motion to dismiss. Blackhawk's recovery moreover was based on "the gross inequity of Data Lease's position"; "Blackhawk rescued [Data Lease] from financial disaster" in exchange for "nothing except a $2,000,000 debt," a result the court refused to condone. Id. at 410. The equities in the instant case, by contrast, are not so clear.[3]
Humana relies on J.R. Sales, Inc. v. Dicks, 521 So.2d 366 (Fla. 1st DCA 1988) (holding that competent substantial evidence supported a finding that the parties agreed to payment for watermelons based on markets available to the buyer, and the prices the buyer paid to other farmers in the relevant time period). Sales however is inapposite. Unlike the buyer who knew the price of watermelons based on what he recently paid for them, Payne and similarly situated patients are buying not one commodity, watermelons, but rather a long list of pills, supplies, and services, for which patients would have to review an allegedly unavailable, lengthy, coded document to know the contract price.
Humana also relies on Interior Design Concepts, Inc. v. Curtin, 473 So.2d 1374 (Fla. 1st DCA 1985) (holding that "daily task sheets" accurately reflected the number of hours devoted to design work performed and, furthermore, the initial partial billing, paid without protest, established an agreed-upon hourly rate; a prima facie case for quantum meruit recovery therefore was made and involuntary dismissal was improper). Interior Design too is inapposite because there "[t]he hourly rates had been fixed between the parties in the first of three billings." Id. at 1376. The instant case, by contrast, presents nothing so simple as an "hourly rate" dispute; rather, an allegedly complicated and unobtainable master charge list containing hundreds of items is at issue.
Payne's count for declaratory judgment states a cause of action as well. Section 86.021, Florida Statutes (1991), provides:

Any person claiming to be interested or who may be in doubt about his rights under a deed, will, contract or other article, memorandum, or instrument in writing or whose rights, status, or other equitable or legal relations are affected by a statute, or any regulation made under statutory authority, or by municipal ordinance, contract, deed, will, franchise, or other article, memorandum, or instrument in writing may have determined any question of construction or validity arising under such statute, regulation, municipal ordinance, contract, deed, will, franchise, or other article, memorandum, or instrument in writing, or any part thereof, and obtain a declaration of rights, status or other equitable or legal relations thereunder.

(Emphasis added.) Section 86.031, Florida Statutes (1991) provides: "A contract may be construed either before or after there has been a breach of it." Payne is in doubt about his rights under the Humana contract; he is entitled to have his rights determined.
The trial court erred in dismissing counts one and two of Payne's complaint. We therefore reverse and remand for consistent proceedings.
BOOTH, LAWRENCE and VAN NORTWICK, JJ., concur.
NOTES
[1]  The Florida Supreme Court determined that the damages of class members may be aggregated to meet the monetary jurisdictional minimum of the circuit court. Johnson v. Plantation Gen. Hosp., 641 So.2d 58 (Fla. 1994). So far as we can determine, the class as yet is uncertified. See id. (Grimes, J., concurring).
[2]  The parties disagree on the question whether the Humana contract's prices are set and ascertainable. Humana argues that they are; the complaint, which must be taken as true, alleges that the prices are not.
[3]  Humana for example says that its "prevailing rates" are specified because they are available in a document called a "charge master," but there is no such document in the instant record. The record furthermore discloses that the "charge master" was made available to patients who requested it only after the commencement of this litigation. The charge master is reported at oral argument to be a document of hundreds of pages, in code.
