
495 S.E.2d 478 (1998)
PO RIVER WATER AND SEWER COMPANY
v.
INDIAN ACRES CLUB OF THORNBURG, INC., et al.
Record No. 970050.
Supreme Court of Virginia.
January 9, 1998.
*479 Gordon F. Willis (Willis & Ashby, on briefs), Fredericksburg, for appellant.
Kenworth E. Lion, Jr. (Jackson, Pickus & Associates, on brief), Richmond, for appellees.
Judith Williams Jagdmann, Virginia State Corporation Commission (Marta B. Curtis, on brief), Richmond, in support of appellant, amicus curiae.
Present: All the Justices.
KEENAN, Justice.
In this appeal, we consider whether a property owners' association must pay a utility for services provided to common area facilities owned by the association.
Indian Acres Club of Thornburg, Inc. (the Association) is the property owners' association for Indian Acres of Thornburg, a private recreational campground in Spotsylvania County. The campground consists of 6,245 individual lots located on 802 acres.
The campground includes certain facilities for the benefit of the individual lot owners, including roads, swimming pools, tennis courts, lakes, parks, a club house, a recreation center, a golf course, a car wash, showers, toilets, and lavatories. The Association owns all the campground's common area facilities. Each of the individual lot owners is a member of the Association.
Po River Water and Sewer Company (Po River) is a Virginia public service corporation *480 certified by the State Corporation Commission (the Commission) to provide water and sewer services to the individual lot owners and to the campground's common area facilities. From 1971 through October 1987, Po River sent one bill for water and sewer services to the Association, or to its predecessor, Indian Acres International. Beginning in November 1987, Po River billed the individual lot owners directly for the cost of providing water and sewer services to the entire campground, including the common areas. However, Po River experienced difficulties in collecting payment for these services from the individual lot owners.
In conjunction with Po River's 1992 application for a rate increase, the State Corporation Commission entered an order in January 1994, requiring Po River to record the amount of water consumed by the Association's common area facilities. The Commission further ordered Po River to submit in its next rate case a rate structure that incorporated the Association as a separate customer class and reflected the Association's water usage.
Po River filed its next rate case in 1995. Based on meter readings, the proposed tariffs and regulations requested a rate of $85,750 per quarter to be charged to the Association, rather than to the individual lot owners, for services provided to the common area facilities. In its required notice to the individual lot owners and to the Association, Po River stated that the rate for the individual lot owners would decrease in proportion to the rate paid by the Association, in order to prevent Po River from being paid twice for the same service. The State Corporation Commission approved the rate requested by Po River on an interim basis, subject to a refund, and permanent rates are currently under consideration by the Commission.
Although Po River sent several bills to the Association seeking payment for service to the common areas at the interim rate, the Association refused to pay any of these bills. Po River then informed the Association that it would terminate water and sewer services to the common area facilities unless the Association paid the quarterly bill of $85,750 and signed a contract for the continuation of utility service to the Association's facilities.
In response, the Association filed a petition for injunctive relief and declaratory judgment asking the trial court to enjoin Po River from terminating services to the common areas and to hold, among other things, that there is no contract for the provision of services between the Association and Po River, that the Association is not a customer of Po River, and that the Association is not responsible for Po River's customer billing.[1] Po River filed a cross-bill requesting that the trial court rule, under the theory of quantum meruit, that Po River is entitled to $85,750 for three months of water and sewer services provided to the Association's common area facilities. Po River also requested the trial court to issue a declaratory judgment stating that the Association must pay Po River for its services at the rate of $85,750 per quarter, subject to refund and modification as may be ordered by the State Corporation Commission.
After a bench trial, the court ruled that the Association was entitled to the "full relief requested." The court held that the individual lot owners are customers of Po River and "are obligated to pay for all water and sewerage services provided by Po River." The trial court enjoined Po River from terminating service to the common area facilities on the basis that the Association is a "nonpaying customer" of the utility. Po River appeals from this decision.
Po River first argues that the trial court lacked jurisdiction to enjoin it from terminating services to the Association, and to rule that the individual lot owners are obligated to pay for the water and sewer services provided to the common area facilities. Po River asserts that the State Corporation Commission has sole jurisdiction over these matters. Po River also argues that the trial court erred in denying the relief requested in its cross-bill.
*481 In response, the Association contends that Po River failed to raise its jurisdictional argument in the trial court and, thus, is prevented from raising this objection on appeal. The Association also argues that the trial court properly exercised its jurisdiction to determine whether an individual or an entity is a customer of a public utility for the purposes of bill collection, because this determination involves private rights and contracts between a public utility and individuals. Lastly, the Association denies that Po River is entitled to quantum meruit relief.
We first address the principles of law that apply to the jurisdictional issue raised by Po River. A challenge to a court's subject matter jurisdiction may be raised at any time, even for the first time on appeal. Wackwitz v. Roy, 244 Va. 60, 63, 418 S.E.2d 861, 863 (1992); Morrison v. Bestler, 239 Va. 166, 170, 387 S.E.2d 753, 756 (1990).
The Commission has a constitutional and statutory duty to fix just and reasonable public utility rates. Va. Const. art. XI, § 2; Code § 12.1-12; Anheuser-Busch Companies v. Virginia Natural Gas, 244 Va. 44, 46, 418 S.E.2d 857, 858 (1992). In setting rates for a public utility, the Commission must first determine the public utility's revenue requirement, and then decide where, how, and from what source or sources the revenue awarded is to be obtained. Id. at 47, 418 S.E.2d at 859; Secretary of Defense v. Chesapeake and Potomac Tel. Co., 217 Va. 149, 152, 225 S.E.2d 414, 417 (1976); Apartment House Council v. PEPCO, 215 Va. 291, 294, 208 S.E.2d 764, 766 (1974); City of Norfolk v. Chesapeake and Potomac Tel. Co., 192 Va. 292, 320, 64 S.E.2d 772, 789 (1951). Thus, in order to allocate a public utility's revenue requirement, the Commission is charged with establishing appropriate customer classes based on usage characteristics of individuals and entities utilizing the utility's services. See Anheuser-Busch Companies, 244 Va. at 46-47, 418 S.E.2d at 858-59; Secretary of Defense, 217 Va. at 152-53, 225 S.E.2d at 416-17; Commonwealth v. Shenandoah River Light and Power Corp., 135 Va. 47, 60, 115 S.E. 695, 699 (1923). In this manner, the Commission sets a particular rate for each identified customer class. See Anheuser-Busch Companies, 244 Va. at 46-47, 418 S.E.2d at 858-59; Secretary of Defense, 217 Va. at 152, 225 S.E.2d at 417; Chesapeake and Potomac Tel. Co., 192 Va. at 320, 64 S.E.2d at 789.
These rate-making duties are encompassed within the Commission's general duty to supervise, regulate, and control public utilities in "all matters relating to the performance of their public duties and their charges therefor." Code § 56-35. Since the Commission has sole jurisdiction to define a utility's customer classes for the purposes of setting the rate at which the defined classes must pay for services received, the trial court did not have jurisdiction to determine who was a "customer" of Po River. Thus, the trial court erred in addressing the issue whether the individual lot owners and the Association are "customers" of Po River.
This conclusion, however, does not end our inquiry because the trial court has jurisdiction to adjudicate and determine private rights and contracts between public utilities and the individual recipients of their services. Appalachian Power Co. v. Walker, 214 Va. 524, 533-34, 201 S.E.2d 758, 766 (1974); City of Lynchburg v. Commonwealth, 164 Va. 57, 63-64, 178 S.E. 769, 771 (1935); Norfolk & W. Ry. Co. v. Commonwealth, 143 Va. 106, 113-14, 129 S.E. 324, 326 (1925). Thus, the trial court has jurisdiction to determine which individuals or entities have received a public utility's services. Once the trial court makes this determination, the court may then compute the recipient's liability for payment at the rate set by the Commission for the customer class pertaining to that recipient. Within this context, the trial court may also consider whether someone other than the recipient is obligated by contract to pay for the utility services provided to the recipient. See id.
Applying these principles, we conclude that the trial court erred in holding that the individual lot owners are obligated to pay Po River directly for water and sewer services provided to the Association's common area facilities. The evidence is uncontroverted that the Association is the owner of the common areas and facilities, and that Po *482 River provided water and sewer services to these facilities. Thus, the Association, not the individual lot owners, received these services from Po River. Further, the record contains no evidence that the individual lot owners were required by contract to pay for the utility services received by the Association. The documents on which the Association relies are unambiguous and do not establish such a duty binding the individual lot owners.[2]
Although neither the individual lot owners nor the Association were required by contract to pay for the utility services received by the Association, we agree with Po River that the trial court erred in failing to grant Po River relief in accordance with its cross-bill, which requested equitable and declaratory relief under the theory of quantum meruit. To avoid unjust enrichment, equity will effect a "contract implied in law," requiring one who accepts and receives the services of another to make reasonable compensation for those services. See Marine Dev. Corp. v. Rodak, 225 Va. 137, 142-44, 300 S.E.2d 763, 765-66 (1983); Ricks v. Sumler, 179 Va. 571, 577, 19 S.E.2d 889, 891 (1942); Hendrickson v. Meredith, 161 Va. 193, 200, 170 S.E. 602, 605 (1933). The liability to pay for the services is based on an implication of law that arises from the facts and circumstances presented, independent of agreement or presumed intention. Marine Dev. Corp., 225 Va. at 142, 300 S.E.2d at 766; Hendrickson, 161 Va. at 200-01, 170 S.E. at 605. The promise to pay is implied from the consideration received. Id.
Here, the record is clear that the Association, as the owner of the common area facilities, accepted and received water and sewer services from Po River. A promise to pay is implied from the acceptance and receipt of those services. Thus, we hold that the Association is required to pay Po River for those utility services.
As stated above, the interim rate in effect for the Association's water and sewer usage is $85,750 per quarter. The quarterly period for which Po River requests monetary relief on a quantum meruit basis is December 1, 1995 through February 29, 1996. Thus, the Association is required to pay $85,750 to Po River for the water and sewer services provided to the Association's common area facilities for that period. We also hold that Po River is entitled to a judgment declaring that the Association is required to pay Po River for the water and sewer services provided to the Association's common area facilities at the rate of $85,750 per quarter, subject to any future refunds and future modifications that may be ordered by the Commission.
For these reasons, we will reverse the trial court's decree and enter final judgment in favor of Po River on the Association's petition for injunctive and declaratory relief and on Po River's cross-bill.
Reversed and final judgment.
NOTES
[1]  Thirty-seven individual lot owners joined the Association as plaintiffs. However, all the plaintiffs except the Association and Audrey V. Conti later obtained a nonsuit of their claims against Po River.
[2]  These documents include the restrictive covenants applicable to the individual lots, Po River's application to the Commission in 1971 requesting certificates of public convenience, Po River's 1971 rates, rules and regulations, and the lease agreement between Po River and Indian Acres Land Company.
