OPINION BY
Judge SIMPSON.We are asked to determine the constitutionality of a retroactive amendment to the statute known as the Municipal Claims and Tax Liens Act (Act).1 The retroactive amendment permitted recovery of reasonable attorney collection fees in addition to delinquent property tax. The current issue arises in the context of a suit initiated before enactment of the retroactive amendment. The trial court’s grant of partial summary judgment holding retroactive application of the amendment constitutional is presently before us on appeal by permission.
I. Statutory Background
Before 1996, Section 3 of the Act, 53 P.S. § 7106(a), permitted a municipality to recover a very limited attorney collection fee in addition to the principal amount due.2 Under this provision, a municipality bore the burden of attorney collection fees in excess of a limited amount.
Effective January 1, 1996, the Act was amended to permit a municipality to recover a reasonable attorney fee in addition to the principal amount due (1996 Amendment).3 This amendment shifted to a de*351linquent taxpayer the burden of a reasonable attorney collection fee. The language of the amended statute, however, addressed “[a]ll municipal claims.”
The amended Act was construed by the Pennsylvania Supreme Court in the 2003 case of Pentlong Corp. v. GLS Capital, Inc., 573 Pa. 34, 820 A.2d 1240 (2003). The Court discussed the historical distinction between municipal claims (for unpaid special taxes) and tax claims (for unpaid general taxes, such as property taxes). It concluded that the ability to add a reasonable attorney collection fee was limited to municipal claims and did not extend to tax claims. Under this decision, a municipality bore the burden of all attorney collection fees for tax claims, but a delinquent taxpayer bore the burden of a reasonable attorney collection fee for municipal claims.
In an obvious attempt to remedy the situation, five months later the General Assembly again amended the Act to expressly include tax claims as among those to which a reasonable attorney collection fee may be added. Act 20 of 2003 (2003 Amendment).4 The 2003 Amendment was made retroactive to January 1, 1996,5 which was the effective date of the 1996 Amendment. With this amendment, a delinquent taxpayer bore the burden of reasonable attorney collection fees for both municipal and tax claims.
II. Procedural Background
About a week after the Supreme Court’s decision in Pentlong Corp. and before the enactment of the 2003 Amendment, the current action commenced in the Court of Common Pleas of Allegheny County (trial court). The action is styled as a class action brought on behalf of all owners of real estate in Pennsylvania “whose real property has been the subject of claims for delinquent municipal property taxes or delinquent school property taxes which delinquent tax claims were placed with Portnoff for collection.” Complaint, ¶ 26; Reproduced Record (R.R.) at 11a. The action names as defendant Portnoff Law Associates, Ltd. (Portnoff), a law firm that represents numerous municipalities and school districts in the collection of delinquent tax claims and municipal claims.
The suit mirrors the claims made in Pentlong Corp., generally challenging the addition by Portnoff of attorney collection fees to delinquent tax claims. As to the named plaintiffs, the suit references delinquent tax claims for the tax years 1998 through 2001, for which claims a sheriffs sale of property was imminently scheduled. The gravaman of the complaint is that under the Act no attorney collection fee could be added to delinquent tax claims. In the alternative, attorney collection fees were excessive and unreasonable. Complaint, ¶¶ 42, 44, 46; R.R. at 15a. The plaintiffs (Delinquent Taxpayers) seek declaratory judgment, recovery of attorney collection fees, recovery of punitive damages, and an injunction against further collection of improper attorney collection fees.
The trial court stayed pending sheriffs sales for the entire class. An answer and new matter was filed raising affirmative defenses, including failure to join any municipality or taxing jurisdiction. No responsive pleading was filed.
Without further discovery or hearings,6 the parties filed cross-motions for sum*352mary judgment on whether the 2003 Amendment could be constitutionally applied to this pending action.
The trial court addressed the tenet of Pennsylvania constitutional law that an accrued cause of action is a vested right which may not be extinguished by retroactive legislation. It concluded that the 2003 Amendment did not unconstitutionally deprive plaintiffs of an accrued cause of action. Embracing an impairment of contracts analysis, the trial court determined the plaintiffs sought to protect a mere personal economic expectation which did not rise to the level of vested right qualifying for constitutional protection. Thus, the trial court denied plaintiffs’ motion for summary judgment and granted Portnoff s motion for partial summary judgment. Subsequently, it certified its order for appeal by permission, and the plaintiffs were granted permission to appeal by this Court.
III. Discussion
Before this Court, the plaintiffs (Delinquent Taxpayers) raise several assignments of error. First, they challenge the legal test used by the trial court, asserting that a vested rights analysis prevails over a rational basis analysis. Second, they dispute the trial court’s conclusion that their existing lawsuit did not constitute a vested right.
Our scope of review of an order granting summary judgment is plenary, and we will reverse the order of a trial court only where the court committed an error of law or clearly abused its discretion. Minn. Fire and Cas. Co. v. Greenfield., 579 Pa. 333, 855 A.2d 854 (2004).
Where, as here, the statute contains the specific legislative direction that it is to be retroactive, the proper starting point is the presumption that the legislature does not intend to violate the Constitution, and the corollary that a party asserting the unconstitutionality of a legislative act bears a heavy burden of proof. Bible v. Dep’t of Labor and Indus., 548 Pa. 247, 696 A.2d 1149 (1997). A statute will only be declared unconstitutional if it clearly, palpably and plainly violates the Constitution. Ieropoli v. AC&S Corp., 577 Pa. 138, 842 A.2d 919 (2004).
A. Test for Constitutionality
Delinquent Taxpayers7 rely on the Remedies Clause of the Pennsylvania Constitution, Article I, Section 11,8 and cases applying the clause to retroactive legislation, most notably Ieropoli They contend the proper test is whether the retroactive act extinguishes an accrued cause of action, which would violate the protection of the Remedies Clause. Also, they assign error to the trial court’s reliance on cases interpreting due process protections and applying a rational basis test.
*353Portnoff9 concedes that the legal analysis set forth in Ieropoli must be met. In addition, the retroactive act must satisfy a due process analysis. Portnoff contends the trial court correctly conducted both analyses.
Ieropoli is a controlling authority. The case involved a statute which limited asbestos-related liabilities of corporations that arose out of mergers or consolidations. The statute expressly applied to pending lawsuits. A machinist with a pending asbestosis suit challenged the constitutionality of the statute, which had the effect of shielding one of the defendants from liability. On appeal from the trial court’s dismissal of the defendant, the Supreme Court reversed. It held that under the Remedies Clause, a cause of action that has accrued is a vested right which may not be eliminated by subsequent legislation. The Supreme Court explained the purpose of this constitutional tenet by reference to several cases, including Lewis v. Pennsylvania R.R. Co., 220 Pa. 317, 324, 69 A. 821, 823 (1908):
‘There is a vested right in an accrued cause of action.... A law can be repealed by the lawgiver; but the rights which have been acquired under it, while it was in force, do not thereby cease. It would be an absolute injustice to abolish with the law all the effects it had produced. This is a principle of general jurisprudence; but a right to be within its protection must be a vested right.’
As part of its analysis in Ieropoli, the Court undertook an evaluation of the machinist’s pending suit and the effect which the statute would have on it. Following the Supreme Court’s process in Ieropoli, we examine the claims made by the Delinquent Taxpayers here, analyzing what cause of action is raised, whether it has accrued, and, if so, how it is affected by the 2003 Amendment.10 As neither the trial court nor the parties undertake this examination, we depart from the arguments.
B. Causes of Action
Our Supreme Court in Ieropoli discussed the meaning of the phrase “cause of *354action.” Acknowledging that the phrase does not have a single definition and means different things depending on context, the Court decided in that case the phrase related to remedy. “It is the vehicle by which a person secures redress from another person for the consequences of an event that is a legal injury.” Ieropoli, 577 Pa. at 155, 842 A.2d at 929-30.
A cause of action arises under Pennsylvania law when one can first maintain an action to a successful conclusion. In re Schorr, 299 B.R. 97 (Bankr.W.D.Pa. 2003). Stated differently, an action does not accrue and the statute of limitations does not begin to run until there is an existing right to sue forthwith. New York & Pennsylvania Co. v. New York Cent. R.R. Co., 300 Pa. 242, 150 A. 480 (1930).
1. Declaratory Judgment
In Count I of their Complaint, the Delinquent Taxpayers request declaratory judgment that all attorney’s fees and expenses collected by Portnoff in connection with tax claims were collected in contravention of Pennsylvania law.
This is a request for a statutory remedy under the Declaratory Judgments Act.11 Under 42 Pa.C.S. § 7533, any person whose rights or other legal relations are affected by a statute, such as the Act as amended by the 1996 Amendment, may have determined any question of construction or validity and obtain a declaration of rights or legal relations thereunder.
In order to sustain an action under the Declaratory Judgments Act, a plaintiff must demonstrate an “actual controversy” indicating imminent and inevitable litigation, and a direct, substantial and present interest. Wagner v. Apollo Gas Co., 399 Pa.Super. 323, 582 A.2d 364 (1990). Because an action for declaratory judgment cannot be sustained until these elements can be shown to exist, it follows that a cause of action for declaratory judgment does not arise until such “actual controversy” exists. Id. The four year “catch-all” statute of limitations begins to run at that time. Id.; see 42 Pa.C.S. § 5525(8).
Under this analysis, Delinquent Taxpayers had an accrued cause of action for declaratory judgment at least at the time they filed suit. The requested declaration will be unavailable to them if the 2003 Amendment is applied retroactively to this claim.
However, the request for declaratory relief contains a fatal jurisdictional flaw. Pursuant to 42 Pa.C.S. § 7540(a), all persons shall be made parties who have or claim any interest which would be affected by the declaration. This provision is mandatory. County of Allegheny v. Commonwealth, 71 Pa.Cmwlth. 32, 453 A.2d 1085 (1983). Also, in tax matters, the appropriate taxing authorities must be served. 42 Pa.C.S. § 7540(b). Failure to join or serve parties as required by the statute is a jurisdictional defect. Pennsylvania Ins. Guar. Ass’n v. Schreffler, 360 Pa.Super. 319, 520 A.2d 477 (1987); Melnick v. Melnick, 147 Pa.Super. 564, 25 A.2d 111 (1942). Such a jurisdictional defect may be raised by a court on its own motion at any time, even on appeal. Pennsylvania Ins. Guar. Ass’n. Where the defect exists, dismissal is appropriate. Id.
Here, the Delinquent Taxpayers neither joined nor served any taxing authority, even the McKeesport Area School District, which is specifically identified as the taxing authority with an interest in the taxes owed by the named plaintiffs and in the proceeds of scheduled sheriffs sale. *355Complaint, ¶¶ 10, 12-20; R.R. at la-4a, 9a-10a. No explanation is offered.
The failure to join at least the McKees-port Area School District improperly deprives that interested public body of a voice in these proceedings, including the consideration of sheriffs sale stays. Further, the failure to join the interested public body imprudently deprives this Court of the benefit of its argument. This jurisdictional defect requires dismissal of Count I seeking declaratory relief. Pennsylvania Ins. Guar. Ass’n.12
2. Unjust Enrichment
In Count II, Delinquent Taxpayers make a claim for unjust enrichment. They aver the attorney’s fees collected by Port-noff are benefits conferred, appreciated, and inequitably retained. Delinquent Taxpayers seek an injunction, a constructive trust, an accounting, and damages.
The elements of unjust enrichment are benefits conferred on defendant by plaintiff, appreciation of such benefits by defendant, and acceptance and retention of such benefits under circumstances that it would be inequitable for defendant to retain the benefit without payment of value. Temple Univ. Hosp., Inc. v. Healthcare Mgmt. Alternatives, Inc., 832 A.2d 501 (Pa.Super.2003), appeal denied, 577 Pa. 724, 847 A.2d 1288 (2004). The most significant element of the doctrine is whether the enrichment of the defendant is unjust; the doctrine does not apply simply because the defendant may have benefited as a result of the actions of the plaintiff. Id. Where unjust enrichment is found, the law implies a quasi-contract which requires the defendant to pay the plaintiff the value of the benefit conferred. Id.
Delinquent Taxpayers state a cause of action for unjust enrichment. This cause of action accrues, however, when the defendant receives and retains benefits. See id.; Tonkin v. Palmer, 26 Pa. D. & C.3d 763 (C.P. Pike County 1983).
Application of the 2003 Amendment to this cause of action will significantly alter the inquiry into whether any enrichment is unjust. Indeed, application of the 2003 Amendment to this claim will remove any argument that enrichment was unjust, thereby effectively extinguishing this cause of action. Thus, the 2003 Amendment affects this cause of action in a way Article I, Section 11 prohibits. Ieropoli, 577 Pa. at 155-56, 842 A.2d at 929-30. The respected trial court fell into error when it concluded otherwise.
In summary, a cause of action for unjust enrichment accrued as to those attorney’s fees actually recovered by Portnoff before the passage of the 2003 Amendment on August 14, 2003. The 2003 Amendment may not be applied to extinguish this cause of action, which will focus on whether any enrichment of Portnoff was unjust. As to attorney’s fees not actually received by Portnoff before August 14, 2003, the cause of action for unjust enrichment was not complete, and the 2003 Amendment may be applied to them.
3. Fraud
In Count III, Delinquent Taxpayers seek redress for an alleged fraudulent scheme to assess, bill and collect unauthorized attorney’s fees and expenses. They *356aver that Portnoff falsely represented it was authorized to assess and collect attorney’s fees and the fees were a legitimate obligation of the Delinquent Taxpayers. They also aver Portnoff was aware of the falsity of the representations after this Court’s decision in Pentlong Corp. v. GLS Capital, Inc., 780 A.2d 734 (Pa.Cmwlth. 2001). However, Delinquent Taxpayers do not aver reliance on Portnoffs representations. Complaint, ¶¶ 49-53; R.R. at 16a-17a.
All the essential elements of fraud must be pled in order to establish a cause of action in fraud. Rivello v. New Jersey Auto. Full Ins. Underwriting Ass’n, 432 Pa.Super. 336, 638 A.2d 253 (1994). A cause of action for fraud includes a showing that the plaintiff acted in reliance on the defendant’s misrepresentation. Klemow v. Time Inc., 466 Pa. 189, 352 A.2d 12 (1976).
Here, Delinquent Taxpayers did not plead reliance. Because a necessary element of the cause of action is not present, no cause of action for fraud accrued before the 2003 Amendment was enacted. Thus, the 2003 Amendment may be applied to this cause of action without offending the Remedies Clause.
IV. Summary
Based on the foregoing discussion, we reject Portnoff s argument that Delinquent Taxpayers had neither vested rights nor any accrued cause of action. We do not follow the numerous cases relied upon by Portnoff which do not address the Remedies Clause and do not employ a vested rights analysis most recently explained in Ieropoli.
We resolve the current appeal by application of the Remedies Clause. Therefore, we need not discuss at length additional arguments relating to a due process analysis of the 2003 Amendment, beyond acknowledging an obvious and rational basis for the General Assembly’s attempt to cure a deficiency in the 1996 Amendment.
For the reasons stated, we remand to the trial court for dismissal of Count I, declaratory judgment, for jurisdictional defects. Also, we affirm in part and reverse in part as to Count II, unjust enrichment. Act 20 of 2003 may be constitutionally applied to that part of Count II relating to attorney’s fees actually received by Port-noff after enactment of Act 20 of 2003. The grant of partial summary judgment is affirmed as to these claims. However, applying Act 20 of 2003 to claims in Count II for relief as to attorney’s fees actually received by Portnoff before August 14, 2003, unconstitutionally extinguishes an accrued cause of action, and the grant of partial summary judgment as to those claims is reversed. Finally, we affirm the trial court as to Count III, fraud. We express no opinion as to the merit of the remaining claims.
ORDER
AND NOW, this 16th day of September, 2005, the order of the Court of Common Pleas of Allegheny County, dated September 17, 2004, is hereby AFFIRMED in part and REVERSED in part.
The matter is remanded for further proceedings consistent with the foregoing opinion. Jurisdiction is relinquished.
.Act of May 16, 1923, P.L. 207, as amended, 53 P.S. §§ 7101-7505.
.See Section 20 of the Act of May 16, 1923, P.L. 207.
.See Sections 1-2 of the Act of February 7, *3511996, P.L. 1.
. Act of August 14, 2003, P.L. 83 (2003 Amendment).
. Section 10 of the 2003 Amendment.
.The docket entries fail to reveal that the mandatory class certification hearing was held or that a ruling was made on class certification. R.R. at la-4a. See Pa. R.C.P. No. 1715(a) (court may not enter summary judg*352ment against class before ruling on class certification); Pa. R.C.P. No. 1715(a) cmt. (summary judgment entered before class certified binds only named plaintiffs).
. Plaintiffs are joined by amicus curiae Association of Community Organizations for Reform Now (ACORN).
. Article I, Section 11, titled "Courts to be open; suits against the Commonwealth,” states (with emphasis added):
All courts shall be open; and every man for an injury done him in his lands, goods, person or reputation shall have remedy by due course of law, and right and justice administered without sale, denial or delay. Suits may be brought against the Commonwealth in such manner, in such courts and in such cases as the Legislature may by law direct.
. Portnoff is joined by amicus curiae GLS Capital, Inc. and amici curiae West Jefferson Hills School District, School District of Pittsburgh, Moon Area School District, Sto Rox School District, Carlynton School District, Montour School District, and Keystone Oaks School District.
. The dissenting opinion follows a different approach. The dissenting opinion posits an unstated cause of action accruing for the Delinquent Taxpayers when tax liens including excessive collection fees were filed. The majority declines to follow this approach for at least two reasons.
First, the dissenting opinion declares a cause of action that was not stated by Delinquent Taxpayers in their complaint. Moreover, Delinquent Taxpayers never raised this issue as a defense or set-off in the underlying tax lien litigation. There is no known authority for analyzing not only stated causes of action but also claims that could have been stated but were not. Adopting such an approach causes uncertainty and invites litigation not only in a vested rights analysis under the Remedies Clause but also in a statute of limitations analysis.
Second, an excessive collection fee by itself is not a cause of action. Rather, it is the basis for a defense or set-off in the underlying tax lien proceedings, or it is an element of a separate cause of action for either malicious abuse of process or wrongful use of civil proceedings. See Morphy v. Shipley, 351 Pa. 425, 41 A.2d 671 (1945); 42 Pa.C.S. § 8351-55. Here, Delinquent Taxpayers did not raise the defense or set-off in the underlying tax lien litigation. Also, neither separate cause of action arising from an excessive collection fee accrues until the underlying proceedings terminate in favor of the plaintiff. See Restatement (Second) of Torts § 674 (1977); 42 Pa.C.S. § 8351(a)(2). Where the cause of action has not accrued, retroactive legislation may be applied without offending the Remedies Clause.
. 42 Pa.C.S. §§ 7531-7541.
. We note that Ieropoli and other cases on which Delinquent Taxpayers rely dealt with lawsuits properly instituted to which retroactive legislation was applied. We do not today address the novel question of whether an accrued cause of action which is not perfected by a properly instituted suit nevertheless constitutes a vested right protected by the Remedies Clause.