Appellants Todd Dahl, Ted Dahl, and Tina Dahl d/b/a South Texas Constructors appeal a plea to the jurisdiction granted in favor of appellee the Village of Surfside Beach (“the City”). In one issue, appellants argue the trial court erred when it granted the City’s plea to the jurisdiction. We reverse and remand for further proceedings. I. BACKGROUND Appellants filed a lawsuit against the City, alleging that Todd filled out a Surfside Utility Service Agreement[1] requesting a water connection for real property where appellants were building a house. Appellants allege that the City’s ordinance § 48-44 (“Tapping fees”) requires the City to pay the prorated costs of the first 100 feet of the extension from the City waterline to their property line. According to appellants, the City refused to use an obvious route of less than 100 feet, instead choosing a much longer route requiring Appellants to pay $4,000.00 before running the waterline. Appellants allege that “[a]fter several visits to city hall, city officials eventually required [appellants] to pay $4,000.00, which they paid under protest” for the water connection. Appellants asserted claims for money had and received and restitution, seeking “to recover from the City the $4,000.00 that the City required them to pay under protest before the water would be connected.” Appellants also requested a declaratory judgment, seeking a determination that appellants “are not required to pay the entire amount of the expense in having the waterlines run to the property where they are building a house.” The City filed an answer and asserted governmental immunity from all of appellants’ claims. Appellants filed a response arguing that: (1) the City’s immunity was waived pursuant to Texas Civil Practice and Remedies Code § 101.0215(a)(32) because the City is liable for damages arising from its governmental functions, including water and sewer services and (2) there was no immunity when a municipality is sued seeking a declaration of the party’s rights under a municipal ordinance. See Tex. Civ. Prac. & Rem. Code Ann. §§ 37.004(a), 101.0215. On March 30, 2023, the trial court signed an order dismissing appellants’ claims with prejudice for lack of jurisdiction based on governmental immunity. This appeal followed. II. DISCUSSION In their sole issue, appellants argue the trial court erred when it granted the City’s plea to the jurisdiction because the City’s immunity was waived as to their claims for money had and received, and for restitution pursuant to Texas Civil Practice and Remedies Code § 101.0215(a)(32). See Tex. Civ. Prac. & Rem. Code Ann. § 101.0215(a)(32) (“A municipality is liable under this chapter for damages arising from its governmental functions, . . . including but not limited to . . . water and sewer service . . . .”). Appellants further argue that the City’s immunity was waived as to their declaratory judgment action because “when a party sues a municipality for a declaration regarding his or her rights under a municipal ordinance, there is no governmental immunity.” A. STANDARD OF REVIEW Governmental immunity shields municipalities from suit unless the state waives immunity. Alamo Heights Indep. Sch. Dist. v. Clark, 544 S.W.3d 755, 770 (Tex. 2018). Immunity from suit may be asserted through a plea to the jurisdiction that challenges the pleadings, the existence of jurisdictional facts, or both. Id. A plea to the jurisdiction is a dilatory plea used to defeat a cause of action without regard to whether the claims asserted have merit. Bland Indep. Sch. Dist. v. Blue, 34 S.W.3d 547, 554 (Tex. 2000). The plea challenges the trial court’s subject-matter jurisdiction. Id. Whether a trial court has subject-matter jurisdiction and whether the pleader has alleged facts that affirmatively demonstrate the trial court’s subject-matter jurisdiction are questions of law that we review de novo. Tex. Dep’t of Parks & Wildlife v. Miranda, 133 S.W.3d 217, 226 (Tex. 2004). The plaintiff has the initial burden to plead facts affirmatively showing that the trial court has jurisdiction. Tex. Ass’n of Bus. v. Tex. Air Control Bd., 852 S.W.2d 440, 446 (Tex. 1993). When a plea to the jurisdiction challenges the pleadings, we determine if the pleader has alleged facts that affirmatively demonstrate the court’s jurisdiction to hear the cause. Id. We construe the pleadings liberally in favor of the plaintiffs and look to the pleader’s intent. If the pleadings do not contain sufficient facts to demonstrate the trial court’s jurisdiction but do not affirmatively demonstrate incurable defects in jurisdiction, then the issue is one of pleading sufficiency and the plaintiff should be afforded the opportunity to amend. Miranda, 133 S.W.3d at 226–27. If the pleadings affirmatively negate the existence of jurisdiction, then a plea to the jurisdiction may be granted without allowing the plaintiff an opportunity to amend. Id. B. APPLICABLE LAW Governmental immunity shields municipalities from suits arising from performance of their “governmental” but not “proprietary” functions. City of Austin v. Utility Assocs., 517 S.W.3d 300, 307 (Tex. App.—Austin 2017, pet. denied); see Wasson Interests, Ltd. v. City of Jacksonville, 489 S.W.3d 427, 439 (Tex. 2016) (“Wasson I“). Courts distinguish between governmental and proprietary functions because cities have no inherent immunity, but derive their immunity from the state. City of Houston v. Williams, 353 S.W.3d 128, 134 (Tex. 2011). As a result, “a city is cloaked in the state’s immunity when it acts as a branch of the state, but only when it acts as a branch of the state.” Wasson I, 489 S.W.3d at 436. Generally speaking, a city’s governmental functions are those acts it performs as the agent of the state in furtherance of general law for the interest of the public at large. Id. at 436. Proprietary functions, in contrast, are those performed by a city, in its discretion, primarily for the benefit of those within the corporate limits of the municipality. Id. at 433–34. In enacting the Texas Tort Claims Act (“TTCA”), the Legislature reclassified certain proprietary functions as governmental. See Tex. Civ. Prac. & Rem. Code § 101.0215; see also City of Tyler v. Likes, 962 S.W.2d 489, 503 (Tex. 1997) (noting that TTCA reclassified maintenance of storm sewers as a governmental function even though it was considered a propriety function at common law). The TTCA applies to tort claims, but courts determining whether immunity applies in the contract-claims context “should be guided . . . by the TTCA’s treatment of the proprietary-governmental distinction.” Wasson I, 489 S.W.3d at 439. Courts determine whether immunity applies in this context by examining “whether the municipality was engaged in a governmental or proprietary function when it entered the contract, not when it allegedly breached the contract.” Wasson Interests, Ltd. v. City of Jacksonville, 559 S.W.3d 142, 149 (Tex. 2018) (“Wasson II“). The TTCA expressly waives sovereign immunity for: (1) property damage, personal injury, and death proximately caused by the wrongful act or omission or the negligence of an employee acting within his scope of employment if: (A) the property damage, personal injury, or death arises from the operation or use of a motor-driven vehicle or motor-driven equipment; and (B) the employee would be personally liable to the claimant according to Texas law; and (2) personal injury and death so caused by a condition or use of tangible personal or real property if the governmental unit would, were it a private person, be liable to the claimant according to Texas law. Tex. Civ. Prac. & Rem. Code Ann. § 101.021(1); see County of Cameron v. Brown, 80 S.W.3d 549, 554 (Tex. 2002) (quoting Tex. Dep’t of Transp. v. Able, 35 S.W.3d 608, 611 (Tex. 2000)). C. ANALYSIS 1. Money Had and Received & Restitution Claims Here, appellants alleged they entered into an agreement with the City for the provision of water lines and service to real property where appellants were building a home. The Legislature has provided that “water and sewer service” is a governmental function of the City. See Tex. Civ. Prac. & Rem. Code Ann. § 101.0215(a)(32) (defining governmental functions to include water and sewer service); Wasson I, 489 S.W.3d at 439. The services appellants complained of are thus governmental functions for which the City has immunity. See Tex. Civ. Prac. & Rem. Code Ann. § 101.0215(a)(32); see also Wasson I, 489 S.W.3d at 439 (noting that whether immunity applies in contract claims “should be guided . . . by the TTCA’s treatment of the proprietary-governmental distinction”). Appellants argue that the City’s immunity is waived as to their claims for money had and received and restitution pursuant to Texas Civil Practice and Remedies Code § 101.0215. However, the waiver of immunity in § 101.0215 is limited to “under this chapter.” See Tex. Civ. Prac. & Rem. Code Ann. § 101.0215(a) (“A municipality is liable under this chapter for damages arising from its governmental functions . . . .”). Section 101.0215 is a waiver of immunity for tort claims for property damage, personal injury, or death. Appellants have not asserted any such claim. Thus, we reject their argument that the City’s immunity is waived based on § 101.0215 and the TTCA. See id. § 101.0215(a)(32); Wasson I, 489 S.W.3d at 439; see also, e.g., Holms v. W. Travis Cnty. Pub. Util. Agency, No. 13-17-00584-CV, 2019 WL 1141870, at *3 (Tex. App.—Austin Mar 13, 2019, no pet.) (mem. op.) (“[B]ecause Holms does not allege ‘property damage, personal injury, [or] death,’ WTCPUA is not liable ‘under this chapter,’ regardless of whether it was engaged in provided ‘water and sewer service.’”). 2. Declaratory-Judgment Claim The Uniform Declaratory Judgment Act (“UDJA”) permits interested persons to a contract whose rights are affected to have determined any question of construction or validity arising under an ordinance or a contract, either before or after the breach. Tex. Civ. Prac. & Rem. Code Ann. § 37.004(a).[2] Appellants argue that the UDJA waives immunity “when a party sues a municipality for a declaration regarding his or her rights under a municipal ordinance, there is no governmental immunity.” Contrary to appellants’ argument, the UDJA waives immunity for claims challenging the validity of ordinances or statutes when the municipality is made a party to the lawsuit. See id. § 37.006(b) (“In any proceeding that involves the validity of a municipal ordinance or franchise, the municipality must be made a party and is entitled to be heard, and if the statute, ordinance, or franchise is alleged to be unconstitutional, the attorney general of the state must also be served with a copy of the proceeding and is entitled to be heard.”); City of El Paso v. Heinrich, 284 S.W.3d 366, 373 n.6 (Tex. 2009); Wichita Falls State Hosp. v. Taylor, 106 S.W.3d 692, 697–698 (Tex. 2003); Tex. Educ. Agency v. Leeper, 893 S.W.2d 432, 446 (Tex. 1994). Here, appellants do not seek a declaration that the City’s ordinance § 48-44 is invalid; instead, appellants challenge actions taken pursuant to the ordinance. Thus, we reject appellants’ claim that the City’s immunity is waived pursuant to the UDJA. See Tex. Civ. Prac. & Rem. Code Ann. § 37.006(b); City of El Paso, 284 S.W.3d at 373 n.6. We overrule appellants’ issue on appeal. 3. Opportunity to Amend Pleadings Nevertheless, we conclude that appellants deserve an opportunity to amend their petition if the jurisdictional defects can be cured. See Tex. A&M Univ. Sys. v. Koseoglu, 223 S.W.3d 835, 846 (Tex. 2007); Miranda, 133 S.W.3d at 226–27. There is “a narrow exception to immunity when a plaintiff seeks reimbursement of an allegedly unlawful tax, fee, or penalty that was paid involuntarily and under duress.” Garcia v. City of Willis, 593 S.W.3d 201, 209 (Tex. 2019); see Saturn Cap. Corp. v. City of Hous., 246 S.W.3d 242, 245 (Tex. App.—Houston [14th Dist.] 2007, pet. denied) (“[S]overeign immunity does not prevent a party who paid illegal government taxes and fees under duress from filing a lawsuit to seek their repayment.”); see also Dall. Cmty. Coll. Dist. v. Bolton, 185 S.W.3d 868, 876 (Tex. 2005) (cataloging precedents on “duress and voluntary payments to government entities” that “extend into the nineteenth century”). This is because money collected from an illegal tax, fee, or penalty should not be treated as the municipality’s property and subject to immunity; instead, the illegally collected tax, fee, or penalty should be refunded if paid because of fraud, mutual mistake of fact, or duress, without respect to waiver of sovereign immunity. Nivens v. City of League City, 245 S.W.3d 470, 474 (Tex. App.—Houston [14th Dist.] 2007, pet. denied). “No legislative consent to sue is needed under these circumstances.” Id. A common element of duress in all its forms is improper or unlawful conduct or threat of improper or unlawful conduct that is intended to and does interfere with another person’s exercise of free will and judgment. Garcia v. City of Willis, 593 S.W.3d 201, 209 (Tex. 2019). This compulsion must be actual and imminent, and not merely feigned or imagined. Id. The Supreme Court of Texas has repeatedly held that duress is established where the unauthorized tax or fee is “required,” “necessary,” or “shall” be paid to avoid the government’s ability to charge penalties or halt a person from earning a livelihood or operating a business. Id. “Succinctly, the decision faced ‘is to comply or close up.’” Id. (quoting Dall. Cmty. Coll. Dist., 185 S.W.3d at 879); see also Dall. Cnty. Cmty. Coll. Dist., 185 S.W.3d at 877 (“[A] person who pays a tax voluntarily and without duress does not have a valid claim for its repayment even if the tax is later held to be unlawful.”). Appellants’ petition alleged the City’s ordinance states: Sec. 48-44. — Tapping fees (a) The village shall charge all customers of its water system the tap fees in subsection (c) of this section for the installation of water service, where the village’s water mains are available at the property line of the customer. . . . . (d) If the village’s water line is not located at the property line, the village shall pay the prorated costs for the first 100 feet of any extension to the property line, and the property owner shall pay the balance of such expense. Appellants’ petition further alleges: Part d of the above section requires the City to pay the prorated costs for the first 100 feet of the extension to the property where Plaintiffs were building a house. There was an obvious less-than 100 feet route from a City waterline to the construction site that the City refused to use when running the requested waterline. Instead, the City ran the waterline a much longer distance and required Plaintiffs to pay $4,000 before running the waterline, which Plaintiffs paid under protest. The ordinance does not allow the City to take a longer route when a short route will do unless the City is willing to pay for the extra cost of doing so itself. Therefore, Plaintiffs sue to recover the $4,000 they paid under protest. Importantly, appellants allege in their petition that the ordinance “does not allow” for the City to take a longer route when a short route will suffice unless the City is willing to pay for the extra cost of the longer route, and that appellants paid “under protest.” Appellants, as plaintiffs, have the initial burden to plead facts affirmatively showing that the trial court has jurisdiction. Tex. Ass’n of Bus., 852 S.W.2d at 446. The facts pleaded here do not show that appellants have invoked the trial court’s jurisdiction under this narrow exception; appellants do not allege that they paid the fees under business compulsion, duress, fraud, or mutual mistake. See Dall. Cnty. Cmty. Coll. Dist. v. Bolton, 185 S.W.3d 868, 877–79 (Tex. 2005) (stating that the Texas Supreme Court has “consistently recognized business compulsion arising from payment of government fees and taxes coerced by financial penalties, loss of livelihood, or substantial damage to a business,” and that reimbursement of illegal fees and taxes is allowed, in essence, when the public entity compels compliance with a void law and subjects the person to punishment if he refuses or fails to comply); Crow v. City of Corpus Christi, 209 S.W.2d 922, 924–25 (Tex. 1948) (discussing business compulsion and duress with regard to cases in which businesses were faced with either paying illegal fees or forfeiting their right to do business); Tara Partners, Ltd. v. City of S. Houston, 282 S.W.3d 564, 577 (Tex. App.—Houston [14th Dist.] 2009, pet. denied) (“[W]here a claim for declaratory or injunctive relief is brought seeking the refund of illegally collected tax payments, governmental immunity will not apply if the taxpayer alleges that the payments were made as a result of fraud, mutual mistake of fact, or duress, whether express or implied.”); Saturn Capital Corp. v. City of Houston, 246 S.W.3d 242, 246 (Tex. App.—Houston [14th Dist.] 2007, pet. denied) (describing duress necessary to authorize illegal-fee recovery as “when the unauthorized . . . fee is required, necessary, or shall be paid to avoid the government’s ability to charge penalties or halt a person from earning a living or operating a business”); Nivens, 245 S.W.3d at 474–75 (holding that the trial court did not err by granting the city’s jurisdictional plea when plaintiffs’ pleadings failed to seek declaratory or injunctive relief regarding refund of excessive tax payments and failed to allege that they made any payments as a result of fraud, mutual mistake of fact, or duress); see also Dall. Cnty. Cmty. Coll. Dist., 185 S.W.3d at 876–79 (holding that a taxpayer cannot bring a suit for the return of illegally collected taxes if the payments were made voluntarily). While appellants allege that they paid the tapping fee “under protest,” appellants’ petition does not allege any facts showing that they were prevented from earning a livelihood or operating a business. See Garcia, 593 S.W.3d at 209; Dall. Cnty. Cmty. Coll. Dist., 185 S.W.3d at 877. Because appellants’ pleadings are insufficient to establish jurisdiction but do not affirmatively demonstrate an incurable jurisdictional defect, we conclude that appellants should be afforded the opportunity to amend their pleadings. See Miranda, 133 S.W.3d at 226–27; see also Turner v. Robinson, 534 S.W.3d 115, 127 (Tex. App.—Houston [14th Dist.] 2017, pet. denied) (concluding that even though appellees challenged actions taken under the ordinance, immunity was waived for appellees’ declaratory claim because appellees also sought a declaration as to the ordinance’s validity). If appellants are unable to plead facts curing the jurisdictional defects, then appellants’ claims will be barred by governmental immunity and should be dismissed. See Miranda, 133 S.W.3d at 226–27. III. CONCLUSION We conclude that the facts alleged in appellants’ petition are insufficient to support the trial court’s jurisdiction but do not affirmatively demonstrate an incurable jurisdictional defect. Therefore, we reverse the trial court’s order and remand for further proceedings consistent with this opinion. Margaret “Meg” Poissant Justice Panel consists of Justices Hassan, Poissant, and Wilson.