Plaintiffs were patients at various Atlanta area hospitals. Through their attorney or directly, they requested copies of their medical records from the hospitals. Defendants are corporations engaged in the business of providing photocopying and related services for hospitals. They had business relationships with the hospitals under which they were given access to patients’ records in order to provide copies of the records to authorized persons requesting them. Defendants did so for plaintiffs and submitted invoices to them imposing charges ranging from $1.04 to $7.60 per page.
After paying the invoices, plaintiffs brought these class action complaints, asserting that the charges were imposed in violation of the Health Records Act in that they exceeded the statutory limit of the reasonable costs of copying and mailing the records. OCGA § 31-33-3 (a). Both individually and on behalf of the proposed class, plaintiffs sought partial refunds under theories of breach of statutory duty, unjust enrichment/restitution, and breach of implied contract. They also sought injunctive relief.
Defendants filed motions to dismiss. They argued, among other things, that the Health Records Act does not impose any duty on them and that any recovery by plaintiffs is barred by the voluntary payment doctrine. In an effort to avoid application of this doctrine, plaintiffs amended their complaints by adding allegations that defendants practiced an artifice on them and that they made the payments as a result of misplaced confidence, mistake, and/or neglect.
The cases were consolidated and, after hearing, the trial court accepted defendants’ arguments and granted the motions. The court did find, however, that their charges for copying and mailing plaintiffs’ medical records were unreasonable and thus excessive.
Appeals were taken to the Supreme Court of Georgia and transferred to this Court pursuant to order stating that the equity issues were ancillary to the legal issues and that the constitutionality issues involved “the construction of well-settled principles of law.”
In Case Nos. A96A0850, A96A0852, A96A0854, and A96A0856, plaintiffs appealed the dismissal of their complaints. In Case Nos. A96A0851, A96A0853, A96A0855, and A96A0857, defendants cross-appealed the court’s finding that the charges were excessive. We dis*610missed the cross-appeal in Case No. A96A0851 because of the defendant’s failure to file its enumeration of errors and brief in a timely manner. The other cases are consolidated for decision.
In Division 1, we conclude that the court did err in holding that the Health Records Acts does not apply to the defendants. In Division 2, we hold that the trial court did not err in dismissing plaintiffs’ complaints under the voluntary-payment doctrine. The remaining issues in the main appeals are moot, as are the cross-appeals, which are dismissed.
1. In the order appealed from, the trial court determined on the basis of the pleadings that plaintiffs’ complaints are subject to dismissal for failure to state a claim upon which relief can be granted. See OCGA § 9-11-12 (b) (6); Yates v. Trust Co. Bank &c., 212 Ga. App. 438 (442 SE2d 293) (1994).
“[W]hen the sufficiency of a complaint is questioned, the pleadings must be construed in the light most favorable to the plaintiff. . . . But ... a complaint will be dismissed where no claim is stated, or where the facts alleged show that plaintiff cannot recover. [Cits.]” Massey v. Perkerson, 129 Ga. App. 895, 896 (1, 2) (201 SE2d 830) (1973). “ ‘ “For the purposes of the (motion for judgment on the pleadings), all well-pleaded material allegations of the opposing party’s pleadings are to be taken as true, and all allegations of the moving party which have been denied are taken as false. Conclusions of law are not admitted. Judgment on the pleadings may be granted only if, on the facts so admitted, the moving party is clearly entitled to judgment.” . . . (Cits.)’ [Cit.]” Yates, supra.
The Health Records Act governs the furnishing of the record of a patient by a “provider.” OCGA § 31-33-1 et seq. Under the Act, a “provider” is defined as meaning all hospitals and other specified entities providing health care services. OCGA § 31-33-1 (2). Upon written request from the patient, the provider having custody and control of the patient’s record is required to furnish a copy of that record to the patient or to any other person or provider designated by the patient. OCGA § 31-33-2 (a), (b). OCGA § 31-33-3 (a) states that the party requesting the patient’s records shall be responsible to the provider for the “reasonable costs of copying and mailing the patient’s record.”
The trial court held that the Act by its plain language applies only to health care providers and not to entities such as defendants which supply photocopying services for such providers even though such entities may be acting as the providers’ agents. This holding was error under principles of statutory construction and agency law.
“It is, of course, fundamental that ‘the cardinal rule to guide the construction of laws is, first, to ascertain the legislative intent and purpose in enacting the law, and then to give it that construction which will effectuate the legislative intent and purpose.’ [Cit.]” City *611of Jesup v. Bennett, 226 Ga. 606, 608 (2) (176 SE2d 81) (1970).
As we interpret the Health Records Act, the intent of the legislature was to ensure that patients have access to medical records in the custody and control of health care providers without being charged more than the reasonable costs of copying and mailing them. This intent would be completely defeated through a construction of the Act that would allow patients to be charged more than the reasonable copying and mailing costs if the providers hire others to perform the task of supplying the records.
Moreover, “the [defendants], being [agents] of the [hospitals], could not be clothed with greater power or authority than [their] principalis]. The [hospitals] cannot do by indirection that which [they] could not do directly, for there can be conferred upon an agent no greater power than that possessed by the principal. [Cits.]” Tippins v. Cobb County Parking Auth., 213 Ga. 685, 688 (100 SE2d 893) (1957).
2. The voluntary payment doctrine is codified at OCGA § 13-1-13: “Payments of claims made through ignorance of the law or where all the facts are known and there is no misplaced confidence and no artifice, deception, or fraudulent practice used by the other party are deemed voluntary and cannot be recovered unless made under an urgent and immediate necessity therefor or to release person or property from detention or to prevent an immediate seizure of person or property. Filing a protest at the time of payment does not change the rule prescribed in this Code section.”
Essentially three conditions must be met before recovery of a payment is barred by the doctrine. First, the payment must have been made through ignorance of the law or where all the facts are known. “ ‘(T)he party seeking recovery must prove that the payment was not voluntarily made because certain material facts were not known at the time of payment or a valid reason existed for failure to determine the truth. (Cit.)’ [Cit.]” Rod’s Auto Finance v. The Finance Co., 211 Ga. App. 63 (1) (438 SE2d 175) (1993). Second, the payment must not have been induced by misplaced confidence, artifice, deception, or fraudulent practice on the part of the person to whom the money is paid. Lowe v. Presley, 86 Ga. App. 328, 332 (71 SE2d 730) (1952). Third, the payment must not have been made under an urgent necessity or for the other reasons specified in the statute. Compare Strachan Shipping Co. v. Mayor &c. of Savannah, 168 Ga. 309 (147 SE 555) (1929), with Rose v. Mayor &c. of Thunderbolt, 89 Ga. App. 599 (80 SE2d 725) (1954).
It is uncontested that when plaintiffs made the payments, all material facts were known by them. At most, they made the payments through an unexcused ignorance of law.
They maintain that defendants practiced an artifice on them by *612providing the records which the hospitals had a duty to provide and then billing them for excessive and illegal amounts which the hospitals could not impose. To the extent that this practice by the defendants may have constituted some sort of artifice, it does not appear that it in any way induced the plaintiffs into making the payments they seek to recover.
The plaintiffs have also alleged that they made the payments through misplaced confidence, mistake, and/or neglect. Again, however, plaintiffs have alleged no facts from which any of these excuses could be found. Compare Gulf Life Ins. Co. v. Folsom, 256 Ga. 400 (349 SE2d 368) (1986), in which it was uncontested that plaintiff made the payment to defendant as the result of a computer mistake. Therefore, these were not the type of sufficiently pleaded factual allegations which the trial court was required to accept as true.
Plaintiffs also claim they made the payments because they would have otherwise risked collection action and impairment of their credit. This does not constitute an urgent necessity within the meaning of the voluntary payment doctrine. See Strachan Shipping, supra. It does not escape the bar of the doctrine.
Nor is it avoided by reason of the fact that the charges were imposed on plaintiffs by defendants in contravention of a statute. See Henson v. Columbus Bank &c. Co., 144 Ga. App. 80 (240 SE2d 284) (1977); see also City of Norcross v. Taylor, 153 Ga. App. 836 (267 SE2d 255) (1980). “[B]y [their] voluntary payment of the [invoices] . . ., [plaintiffs] cannot demand return of the [money] based upon an alleged breach of contract.” Henson, 144 Ga. App. at 82 (3). Further, a party is not entitled to the recovery of restitutionary damages for unjust enrichment where there has been a voluntary payment of the money received. See Ginsberg v. Termotto, 175 Ga. App. 265, 266 (1) (333 SE2d 120) (1985); compare Jennings v. Stewart, 106 Ga. App. 689, 690 (3) (127 SE2d 842) (1962).
For the foregoing reasons, the court did not err in dismissing the various counts of plaintiffs’ complaints, as well as their requests for injunctive relief. It follows that it was not error to refuse to grant class action certification to these cases. See Williams v. Cox Enterprises, 159 Ga. App. 333, 335 (5) (283 SE2d 367) (1981).
3. Although we dismiss defendants’ cross-appeals as moot, we note that, for the purpose of ruling on defendants’ motions to dismiss, the trial court was required to accept as true plaintiffs’ allegations concerning the unreasonableness of defendants’ charges. See Yates, supra.
Judgments in Case Nos. A96A0850, A96A0852, A96A0854, and A96A0856 affirmed. Appeals in Case Nos. A96A0853, A96A0855, and A96A0857 dismissed.
Birdsong, P. J., concurs. Blackburn, J., concurs specially. *613Decided May 9, 1996 Reconsiderations denied June 3, 1996 Carr, Tabb & Pope, David H. Pope, Timothy W. Wolfe, Victor Alexander, Jr., for appellants. Arnall, Golden & Gregory, Karen B. Bragman, Henry M. Perlowski, Hunter, Maclean, Exley & Dunn, Timothy N. Toler, Arnold C. Young, Nelson, Mullins, Riley & Scarborough, Robert W. Foster, Jr., B. Shane Clanton, for appellees.