— This matter is before the court on the preliminary objections of plaintiff HSBC Bank USA, N.A. (“HSBC”) to the amended counterclaim of defendants Douglas W. Walters, Patricia K. Walters, and Rosemarie Walters (collectively, the “Walters”). For the reasons set forth below, we hold that HSBC’s preliminary objections must be sustained.
BACKGROUND
I. The Mortgage
On October 28, 2005, the Walters obtained a loan in the amount of $125,000 from Delta Funding Corp. (“Delta” or “Lender”), evidenced by a promissory note (the “note”). See compl. ¶ 3, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. May 14, 2012) (“compl.”). The note was secured by a mortgage on the Walters’ property located at 775 Rutt Road, Bangor, Northampton County, Pennsylvania, 18013 (the “property”). See mortgage dated Oct. 28, 2005 Between Delta Funding Corp. and Douglas Walters, Patricia Walters, and Rosemarie Walters at 3, attach, to amended counterclaim, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Jan. 22, 2013) (the “mortgage”). The parties to the mortgage were the Walters and Delta’s nominee, Mortgage Electronic Registration Services, Inc. See id. at 1.
The mortgage provided that the Walters would make monthly payments of principal and interest on the note *528and certain additional amounts known as “escrow items.” See id. § 1 (“Borrower shall pay when due the principal of, and interest on, the debt evidenced by the Note and any prepayment charges and late charges due under the Note. Borrower shall also pay funds for Escrow Items pursuant to Section 3.”). The “escrow items” included amounts necessary to cover property taxes that would become due on the property. See id. § 3 (“Borrower shall pay to Lender on the day Periodic Payments are due...a sum (the “Funds”) to provide for payment of amounts due for: (a) taxes and assessments and other items which can attain priority over this Security Instrument as a lien or encumbrance on the Property....”).
The Walters’ monthly payments were to be placed into an escrow account, and the Lender agreed to apply the escrow funds to pay the property taxes in a timely manner as they became due, as required by the Real Estate Settlement Procedures Act (“RESPA”), 12 U.S.C. § 2601 et seq. See id. (“Lender shall apply the Funds to pay the Escrow Items no later than the time specified under RESPA.”). The relevant provision of RESPA states as follows:
If the terms of any federally related mortgage loan require the borrower to make payments to the servicer of the loan for deposit into an escrow account for the purpose of assuring payment of taxes, insurance premiums, and other charges with respect to the property, the servicer shall make payments from the escrow account for such taxes, insurance premiums, and other charges in a timely manner as such payments become due.
12 U.S.C.A. § 2605(g).
*529The mortgage provided that in the event there was a shortage of funds in the escrow account as defined under RESPA, the Lender would notify the Walters, and the Walters would pay the Lender the amount necessary to make up the shortage. See mortgage § 3 (“If there is a shortage of funds held in escrow, as defined under RESPA, Lender shall notify Borrower as required by RESPA, and Borrower shall pay to Lender the amount necessary to make up the deficiency in accordance with RESPA....”).
The mortgage provided that it was to be governed by federal and Pennsylvania law. See id. § 16 (“This security Instrument shall be governed by federal law and the law of the jurisdiction in which the property is located.”). The provisions of RESPA relating to borrower inquiries provide as follows:
Duty of loan servicer to respond to borrower inquiries
(1) Notice of receipt of inquiry
(A) In general
If any servicer of a federally related mortgage loan receives a qualified written request from the borrower (or an agent of the borrower) for information relating to the servicing of such loan, the servicer shall provide a written response acknowledging receipt of the correspondence within 5 days (excluding legal public holidays, Saturdays, and Sundays) unless the action requested is taken within such period.
(B) Qualified written request
For purposes of this subsection, a qualified written request shall be a written correspondence, other than *530notice on a payment coupon or other payment medium supplied by the servicer, that —
(1) includes, or otherwise enables the servicer to identify, the name and account of the borrower; and
(ii) includes a statement of the reasons for the belief of the borrower, to the extent applicable, that the account is in error or provides sufficient detail to the servicer regarding other information sought by the borrower.
(2) Action with respect to inquiry
Not later than 30 days (excluding legal public holidays, Saturdays, and Sundays) after the receipt from any borrower of any qualified written request under paragraph (1) and, if applicable, before taking any action with respect to the inquiry of the borrower, the servicer shall —
(A) make appropriate corrections in the account of the borrower, including the crediting of any late charges or penalties, and transmit to the borrower a written notification of such correction (which shall include the name and telephone number of a representative of the servicer who can provide assistance to the borrower);
(B) after conducting an investigation, provide the borrower with a written explanation or clarification that includes —
(i) to the extent applicable, a statement of the reasons for which the servicer believes the account of the borrower is correct as determined by the servicer; and
(ii) the name and telephone number of an individual *531employed by, or the office or department of, the servicer who can provide assistance to the borrower; or
(C) after conducting an investigation, provide the borrower with a written explanation or clarification that includes —
(i) information requested by the borrower or an explanation of why the information requested is unavailable or cannot be obtained by the servicer; and
(ii) the name and telephone number of an individual employed by, or the office or department of, the servicer who can provide assistance to the borrower.
12 U.S.C.A. § 2605(e).
II. The Instant Litigation
HSBC is Delta’s successor in interest on the mortgage. See comply 1. On May 14,2012, HSBC filed a complaint in mortgage foreclosure against the Walters, alleging that the mortgage was in default because the Walters had failed to make the monthly payments due on the note from October 1, 2011 through the date of the filing of the complaint. See compl. ¶¶ 1-5. HSBC alleged that it had sent notice of the default to the Walters in accordance with applicable law and that the Walters had failed to cure the default. See id. ¶¶ 6-7. As a result, HSBC alleged that all sums secured by the mortgage, including the unpaid principal balance and interest and certain additional fees, charges, and costs, were immediately due and payable. See id. ¶¶5-6. HSBC demanded a judgment in rem against the Walters in the amount of $144,526.75, plus accrued interest, costs, and attorneys’ fees, and a sale of the property to satisfy the judgment. See id. at 3. However, HSBC did not attach a *532copy of the mortgage to its complaint. See id.
On May 14,2012, pursuant to the Residential Mortgage Foreclosure Diversion Program, the court issued an order scheduling a conciliation conference for August 20, 2012. See Case Management Order, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. May 14, 2012). The order did not indicate whether the matter was stayed pending the conciliation conference. See id.
On June 11, 2012, the Walters filed an answer and counterclaim. See defendants’ answer to plaintiff’s complaint with new matter and counterclaim, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. June 11, 2012) (the “counterclaim”). The counterclaim consisted of one claim for unjust enrichment. See id. ¶¶ 20-30. In the counterclaim, the Walters asserted:
22. Plaintiffs have conferred a benefit to [HSBC] in the form of money.
23. Since February 2007 through 2010, [HSBC] has failed to pay the property taxes at 775 Rutt Road from the escrow account of plaintiffs.
24. Instead of paying the property taxes for 775 Rutt Road from that property’s escrow account, [HSBC] has incorrectly paid the property taxes at 755 Rutt Road, a property also owned by the plaintiffs and of which had no association with the mortgage at 775 Rutt Road, thus increasing the monthly payments of plaintiffs because of its error.
25.The taxes at 755 are paid in a separate transaction *533by plaintiffs; therefore, were unnecessarily paid by [HSBC].
26. Since 2010, [HSBC] has paid the property taxes for both 755 and 775 Rutt Road from the escrow account of 755 Rutt Road and increased the monthly payments being made by plaintiffs to an amount they could no longer afford, thus leaving them subject to foreclosure and also inducing them into agreeing to a loan [modification] in 2010 because of the increased monthly requirement.
27. Plaintiffs have written several letters to [HSBC] about its error; however, those communications were ignored.
28. Plaintiffs conferred the benefits referenced above in reliance upon [HSBC’s] promise to pay for taxes for which they owed under the 775 Rutt Road mortgage.
29. [HSBC] has received the benefit of plaintiffs’ money, but plaintiffs have received no benefit from [HSBC]. In fact, plaintiff is in a worse position due to [HSBC’s] failure to pay for the taxes of the property, thereby increasing their mortgage payment and resulting in this foreclosure action.
30. To permit [HSBC] to receive the benefit of payment without having to submit payment to plaintiffs would be unjust.
Id. ¶¶ 23-30. The Walters demanded judgment in an amount to be determined plus attorneys’ fees, costs, interest, and delay damages. See id. at 5. However, the Walters did not attach a copy of the mortgage to their counterclaim. See id.
*534On July 6, 2012, HSBC filed preliminary objections to the Walters’ Counterclaim. See plaintiff’s preliminary objections, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. July 6, 2012) (“preliminary objections”). HSBC asserted that under Pa.R.C.P. 1141(a), an action for mortgage foreclosure “shall not include an action to enforce a personal liability.” Id. ¶ 6. HSBC asserted that the Walters’ counterclaim was an in personam claim for damages and therefore could not properly be asserted as a counterclaim in an in rem action for mortgage foreclosure. See id. ¶ 5. Accordingly, HSBC asserted that the Walters’ counterclaim must be dismissed pursuant to Pa.R.C.P. 1028(a)(5) for misjoinder of a cause of action. See id. ¶¶ 4, 7-8. HSBC did not attach a copy of the mortgage to its preliminary objections. See id.
On August 20,2012, the court issued an order directing the parties to confer about the “tax issue” and staying further proceedings pending a conciliation conference. See HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Aug. 20, 2012). On September 24, 2012, following a conciliation conference at which the parties failed to reach an agreement, the court issued an order authorizing HSBC to proceed with the foreclosure action. See HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Sept. 24, 2012).
On November 5, 2012, the Walters filed an answer to HSBC’s preliminary objections to their counterclaim. See defendants’ answer to plaintiff’s preliminary objections, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Nov. 5, 2012). The Walters asserted that their counterclaim for damages for HSBC’s failure to pay their property taxes was permitted *535by Pa.R.C.P. 1148. See id. ¶¶ 5-8. Rule 1148 states that in an action for mortgage foreclosure, “[a] defendant may plead a counterclaim which arises from the same transaction or occurrence or series of transactions or occurrences from which the plaintiff’s cause of action arose.” Pa.R.C.P. 1148. The Walters further cited Chrysler First Bus. Credit Corp. v. Gourniak, 601 A.2d 338, 342 (Pa. Super. 1992), which states that a defendant may assert a counterclaim under Rule 1148 if it is “part of, or incident to, the creation of the mortgage itself.” Id. The Walters asserted, somewhat inartfully, that “the counterclaim not only arises from the same transaction or occurrence, but also the mortgage payment includes the escrow payments [that] stem from the cause of action [from] which [HSBC’s] claim arose.” Id. However, the Walters did not attach a copy of the mortgage to their answer to HSBC’s preliminary objections. See id.
On January 7,2013, the court issued an order sustaining HSBC’s preliminary objections and striking the Walters’ counterclaim. See HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Jan. 7,2013). The court agreed with the Walters that Rule 1148 creates an exception to Rule 1141(a) and permits assertion of a counterclaim for damages if the counterclaim is “part of, or incident to, the creation of the mortgage itself.” Id. at 5-6. However, because the Walters had not alleged that HSBC’s obligation to pay property taxes was expressly stated in the mortgage and had not attached a copy of the mortgage to their counterclaim, the court could not determine whether the Walters’ counterclaim was “part of, or incident to, the creation of the mortgage.” Id. at 7.
Although the Walters have alleged that HSBC *536promised to pay for taxes that the Walters owed under the mortgage for the property, there is no allegation indicating that this promise was contained as part of the mortgage itself. If such an allegation were present here, we would agree with the reasoning in the persuasive (but not binding) decision in Mortgage Electronic Registration Systems, Inc. v. Alicea, Civil No. 1:CV-05-2165, 2006 WL 1149236 (M.D. Pa. Apr. 26, 2006), that the allegations here would be sufficient to maintain this counterclaim. However, since there is no such allegation here, we are constrained to dismiss this counterclaim, but we will allow the Walters to file an amended counterclaim within twenty days.
Id.
On January 22, 2013, the Walters filed an amended counterclaim. See amended counterclaim, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Jan. 22, 2013) (“Amended counterclaim”). The amended counterclaim reasserted the Walters’ claim for unjust enrichment but added the following two paragraphs:
5. Defendant, by way of mortgage recorded on November 14, 2005 attached hereto, in Section 3 of the mortgage instrument, plaintiffs were required to pay under the note, periodic payments of amount due including, “taxes and assessments and other items which can attain over this security instrument as a lien or encumbrance on the Property.”
6. Defendant’s obligation to pay property taxes from the payments submitted by plaintiffs arose from the mortgage instrument, as such, defendant’s failure to *537pay the appropriate taxes caused severe detriment to plaintiffs.
Id. ¶¶ 5-6. Attached to the amended counterclaim was a copy of the mortgage, which reflected the terms and provisions set forth above. See id.
On January 17, 2014, HSBC filed preliminary objections to the Walters’ amended counterclaim. See plaintiff’s preliminary objections to defendants’ amended counterclaim, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Jan. 17, 2014) (“preliminary objections to the amended counterclaim”). HSBC asserted that .the Walters’ amended counterclaim is improper under Rule 1148, because “even the amended allegations clearly do not relate to facts or circumstances surrounding the creation of the mortgage, but rather to an apparent dispute as to the payment of real estate taxes which accrued over the term of the loan.” Id. ¶ 12. However, HSBC did not raise a preliminary objection based on misjoinder of a cause of action under Pa.R.C.P. 1028(a) (5). Rather, HSBC asserted: “Because the counterclaim is improper in this proceeding, ... it is required to be dismissed for failure to state a cause of action upon which relief may be granted and for failure to comply with rule of court pursuant to Pa.R.C.P. 1028(a)(4) and 1028(a)(2), respectively.” Id. ¶ 13.
On February 24, 2014, the Walters filed an answer to HSBC’s preliminary objections to the amended counterclaim. See defendants’ answer to plaintiff’s preliminary objections, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Feb. 24, 2014)(“answer to preliminary objections to amended counterclaim”). The Walters asserted that their amended *538counterclaim satisfies Rule 1148. See id. ¶ 5. They asserted that because HSBC’s obligation to pay property taxes is set forth in an express provision of the mortgage, their amended counterclaim is “part of, or incident to, the creation of the mortgage” and “arises from the same transaction and occurrence” as HSBC’s claim for foreclosure. See id. (“[Paragraph 3 of the mortgage] clearly requires both the lender and the borrower to comply with terms contained in the document creating the mortgage. As stated in defendants’ counterclaim, this obligation creates a contractual relation from the creation of the mortgage.”). Thus, the Walters asserted that the court should follow the reasoning of the case cited in the court’s January 7, 2013 order, Mortgage Electronic Registration Systems, Inc. v. Alicea, Civil No. 1:CV-05-2165, 2006 WL 1149236 (Apr. 26, 2006), and overrule the preliminary objections to the amended counterclaim. See id. at 2.
DISCUSSION
I. Preliminary Objections
Pa.R.C.P. 1028(a) states:
Rule 1028. Preliminary objections
(a) Preliminary objections may be filed by any party to any pleading and are limited to the following grounds:
(2) failure of a pleading to conform to law or rule of court or inclusion of scandalous or impertinent matter;
(4) legal insufficiency of a pleading (demurrer).
*539Pa.R.C.P. 1028(a). “Preliminary objections in the nature of a demurrer test the legal sufficiency of the complaint.” Estate of O’Connell ex rel. O’Connell v. Progressive Ins. Co., 79 A.3d 1134, 1137 (Pa. Super. 2013).
When considering preliminary objections, all material facts set forth in the challenged pleadings are admitted as true, as well as all inferences reasonably deducible therefrom. Preliminary objections [that] seek the dismissal of a cause of action should be sustained only in cases in which it is clear and free from doubt that the pleader will be unable to prove facts legally sufficient to establish the right to relief. If any doubt exists as to whether a demurrer should be sustained, it should be resolved in favor of overruling the preliminary objections.
Id. (quoting Feingold v. Hendrzak, 15 A.3d 937, 941 (Pa. Super. 2011)).
HSBC asserts that the Walters’ amended counterclaim is impermissible under Rule 1148, because it is not “part of, or incident to, the creation of the mortgage” and that, as a result, it must be stricken for failure to conform to law or rule of court under Pa.R.C.P. 1028(a)(2) and for legal insufficiency (demurrer) under Pa.R.C.P. 1028(a)(4). See preliminary objections to the amended counterclaim ¶¶ 12-13.
We hold that the Walters’ amended counterclaim is “part of, or incident to, the creation of the mortgage” and is therefore proper under Rule 1148. However, as more fully set forth below, a claim for unjust enrichment cannot be maintained when the basis for the claim is the subject of an express contractual provision. Because the amended *540counterclaim now seeks relief based on an express contractual provision in the mortgage, see amended counterclaim ¶¶ 5-6, we hold that HSBC’s preliminary objection based on failure to conform to law or rule of court under Pa.R.C.P. 1028(a)(2) and legal insufficiency (demurrer) under Pa.R.C.P. 1028(a)(4) must be sustained.
II. Rules Governing Mortgage Foreclosure
Actions for mortgage foreclosure are governed by Rules 1141 through 1150 of the Pennsylvania Rules of Civil Procedure. See Signal Consumer Discount Co. v. Babuscio, 390 A.2d 266, 270 (Pa. Super. 1978). Rule 1141, which defines actions for mortgage foreclosure, states: “As used in this chapter, ‘action’ means an action to foreclose a mortgage upon any estate, leasehold or interest in land...but shall not include an action to enforce a personal liability.” Pa.R.C.P. 1141(a).
However, Rule 1148 is an exception to Rule 1141(a). See Signal Consumer Discount, 390 A.2d at 270. Rule 1148 states: “A defendant may plead a counterclaim which arises from the same transaction or occurrence or series of transactions or occurrences from which the plaintiff’s cause of action arose.” Pa.R.C.P. 1148. The court in Signal Consumer Discount stated:
The very definition of a mortgage foreclosure action under Rule 1141(a) excludes “an action to enforce a personal liability”; this restriction is essential to preserve the “de terris” identity of a mortgage foreclosure action and is equally binding on a mortgagee-plaintiff and a mortgagor-defendant. Rule 1148, which allows a defendant to assert a contractual counterclaim arising out of a mortgage transaction against the mortgagee, *541constitutes the only exception to this rule.
390 A.2d at 270 (footnote omitted).
“[Rule 1148] has been interpreted as permitting to be pled only those counterclaims that are part of or incident to the creation of the mortgage itself.” Chrysler First Bus. Credit Corp. v. Gourniak, 601 A.2d 338, 341 (Pa.Super. 1992).
“[Rule 1148] restricts every defendant to claims which arise from the same transaction or occurrence or series of transactions or occurrences from which the plaintiff’s cause of action arose.... No defendant may now set off a claim against the plaintiff simply because its nature is contractual or quasicontractual, as allowed in assumpsit actions. The claim must now arise, in some manner from the mortgage relationship.”
Id. (quoting 3 Goodrich-Amram 2d: Procedural Rules Service with Forms §1148:1 at 488) (emphasis added by court).
Courts applying these principles have held that Rule 1148 would permit assertion of a counterclaim for fraud in the inducement of the mortgage. See, e.g., Green Tree Consumer Discount Co. v. Newton, 909 A.2d 811, 814 (Pa. Super. 2006) (allowing counterclaim asserting that mortgagor who executed the mortgage to secure home improvement loan was never informed that he was signing a mortgage document and was mentally incompetent to enter into the mortgage; “Fraud in the inducement of the mortgage is clearly a permissible counterclaim under Rule 1148.”).
However, Rule 1148 would not permit assertion of a *542counterclaim for fraud in the inducement of the underlying sale of the property, a transaction separate from the mortgage relationship. See id. at 815.
[T]he owners are not allowed to claim that they did not owe an obligation to make their mortgage payments because the seller of the house failed to tell them about a leaky basement. The sale of the home, with all attendant requirements for disclosure regarding the condition of the house, is a separate transaction from obtaining a mortgage. As such, Rule 1148 prevents that counterclaim.
Id.; accord Chrysler, 601 A.2d at 341 (Rule 1148 did not permit mortgagors to assert a counterclaim that the seller had fraudulently induced them to enter into the contract of sale of the property by falsely representing that seller would extend separate financing for rehabilitation of the property and operation of buyers’ business; “[mortgagors’] counterclaim arises from alleged fraudulent misrepresentations which they contend induced them to enter into a contract for the purchase of the real property. This is precisely the type of counterclaim that is not cognizable under Rule 1148.”)(emphasis in original); Mellon Bank, N.A. v. Joseph, 406 A.2d 1055, 1060 (Pa. Super. 1979) (mortgagor could not assert counterclaims seeking (1) damages for the lender’s refusal to accept tender of the mortgage obligation to cure the default; or (2) an order compelling the lender to assign the mortgage; “Here, the counterclaims appellant seeks to assert are remedial; they arose once the mortgage was in default, but were not part of, or incident to, the creation of the mortgage itself.”).
Under the above-cited authorities, in order to determine *543whether the Walters’ amended counterclaim is permissible under Rule 1148, the court must first identify the basis of their claim for relief. The court must then determine whether the claim is “part of, or incident to, the creation of the mortgage itself.” Chrysler, 601 A.2d at 341.
III. Basis for the Walters’ Counterclaim
In their amended counterclaim, the Walters assert that they defaulted on the mortgage because HSBC breached its obligation to pay their property taxes as they became due and, as a result, increased their monthly payments to an amount they could no longer afford. See amended counterclaim ¶¶ 4-9. They seek damages resulting from HSBC’s breach of its obligation. See id. at 3. In its order of January 7, 2013, this court stated:
[W]e cannot discern from the counterclaim that the failure to pay the property taxes from the escrow account is part of, or incident to, the creation of the mortgage. Although the Walters have alleged that HSBC promised to pay for taxes that the Walters owed under the mortgage for the property, there is no allegation indicating that this promise was contained as part of the mortgage itself. If such an allegation were present here, we would agree with the reasoning in the persuasive (but not binding) decision in Mortgage Electronic Registration Systems, Inc. v. Alicea, Civil No. 1:CV-05-2165, 2006 WL 1149236 (M.D. Pa. Apr. 26, 2006) that the allegations here would be sufficient to maintain this counterclaim. However, since there is no such allegation here, we are constrained to dismiss this counterclaim, but we will allow the Walters to file an amended counterclaim within twenty days.
*544HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526, at 7 (C.P. Northampton Co. Jan. 7, 2013).
In their amended counterclaim, the Walters have addressed the question raised in the court’s January 7,2013 order, alleging that HSBC’s obligation to pay their property taxes was set forth in the mortgage itself. See amended counterclaim ¶¶ 5-6. The court has reviewed the amended counterclaim and the mortgage attached thereto and finds that HSBC’s obligation to pay the Walters’ property taxes is expressly stated in section three of the mortgage. See mortgage § 3 (“Lender shall apply the funds to pay the Escrow Items no later than the time specified under RESPA.”). The mortgage also contains the provisions that permitted HSBC to increase the Walters’ monthly payments to cover the allegedly increased amounts due for taxes. See id. (“If there is a shortage of funds held in escrow, as defined under RESPA, Lender shall notify Borrower as required by RESPA, and Borrower shall pay to Lender the amount necessary to make up the deficiency in accordance with RESPA.”). We will now review the decision of the United States District Court for the Middle District of Pennsylvania1 in Alicea to determine whether the Walters’ amended counterclaim is “part of, or incident to, the creation of the mortgage itself.” Chrysler, 601 A.2d at 341.
IV. The Decision in Alicea
In Alicea, as here, the mortgage required the mortgagee to escrow funds from the mortgagors’ monthly payments *545to pay the mortgagors’ property taxes as they became due. See Mortgage Electronic Registration Systems, Inc. v. Alicea, Civil No. 1:CV-05-2165, 2006 WL 1149236 (M.D. Pa. Apr. 26, 2006). As here, the mortgagee allegedly failed to pay the taxes and, as a result, the property was sold at a tax sale. See id. At the time of the tax sale, the mortgagors were under contract to sell the property to a third party. See id. As a result of losing the property at the tax sale, the mortgagors suffered damages in the amount of the profit they would have received on the sale to the third party. See id. The mortgagee brought an action to foreclose against the mortgagors and the party that had purchased the property at the tax sale. See id. As here, the mortgagors asserted a counterclaim for breach of the mortgagee’s obligation to pay the property taxes. See id. The mortgagors sought damages in the amount of the profit they would have received had they sold the property to the third party. See id. The court stated:
In support of its motion to dismiss, [mortgagee] argues that Pennsylvania law does not permit counterclaims in mortgage foreclosure actions unless they are “part of or incident to the creation of the mortgage...” Chrysler First Bus. Credit Corp. v. Gourniak, 411 Pa. Super. 259, 266, 601 A.2d 338, 342 (1992). See also Cunningham v. McWilliams, 714 A.2d 1054, 1057 (Pa. Super. 1998); Overly v. Kass, 282 Pa. Super. 108, 114 554 A.2d 970, 973 (1989); Mellon Bank, N.A. v. Joseph, 267 Pa. Super. 307, 317 406 A.2d 1055, 1060 (1979). We find that [mortgagors’] counterclaim meets this test. Fairly read, it alleges that the mortgage documents required them to pay to the mortgagee amounts that would cover the tax obligations on the property and that in *546turn the mortgagee was to pay the taxing authorities. However, although [mortgagors] had remained current on their obligation through 2002, the mortgagee had failed to pay the taxes, resulting in a tax sale in 2004 that prevented [mortgagors] from completing a sale in 2004 that would have netted them $7,000. Since the mortgagee’s obligation allegedly arises from the mortgage documents, the counterclaim does not violate Rule 1148. See Meritor Sav. Bank v. Barone, 399 Pa. Super. 213, 216-17, 582 A.2d 21, 23 (1990) (bank’s failure to obtain the type of disability insurance promised in its disclosure form when mortgagees executed their mortgage was a proper basis for a counterclaim).
Id. (footnote omitted). Thus, the court held that the mortgagors’ counterclaim for damages based on breach of the mortgagee’s obligation to pay the taxes was “part of, or incident to, the creation of the mortgage” and was therefore a proper basis for a counterclaim under Rule 1148. See id.
V. Alicea’s Application of Pennsylvania Law
HSBC asserts that Alicea, a federal case that is not binding on this court, was wrongly decided and should not be followed. See memorandum of law in support of plaintiff’s preliminary objections to defendants’ amended counterclaim at 6-8, HSBC Bank USA, N.A. v. Walters, No. C-48-CV-2012-4526 (C.P. Northampton Co. Jan. 17, 2014) (“HSBC’s Br.”). First, HSBC asserts that a mortgagee’s failure to pay property taxes cannot occur at the inception of the mortgage but can occur only after the passage of time and therefore cannot arise out of the “creation” of the mortgage. See id. at 6 (“[T]here can be no question that defendants’ claims did not exist at the time the mortgage *547was executed, being that the claim for unjust enrichment is premised on an alleged enrichment that occurred when tax escrow payments were made by defendants, over two years after the origination of the mortgage.”).
Second, HSBC asserts that “the short analysis in Alicea is based on a fundamentally flawed premise, namely that the plaintiff is seeking an in personam judgment against the mortgagors.” Id. at 6. HSBC quotes the following language from an unrelated section of the opinion: “[Tjhat plaintiff seeks an in personam judgment against [mortgagors] here is not a reason to abstain; if anything, it justifies an exercise of continuing jurisdiction.” Id. at 7 (quoting Alicea, 2006 WL 1149236, at 5-6). HSBC states:
While this court previously indicated that it may find the Alicea decision persuasive, in light of the federal court’s apparent misapprehension of the fundamental nature of a Pennsylvania foreclosure, [HSBC] would urge the court to be guided by the long history of case law developed by the courts of the Commonwealth despite the fact that the issue of a counterclaim based on tax escrow payment issues has not been specifically addressed.
Id. We disagree.
First, the statement HSBC quotes from Alicea was made in connection with the court’s analysis of the Rooker-Feldman Abstention Doctrine. See 2006 WL 1149236, at 5-6. There was no indication that the quoted language had any impact on the court’s determination that the mortgagee’s obligation to pay property taxes was “part of, or incident to, the creation of the mortgage” and was therefore a proper basis for a counterclaim under *548Rule 1148. Second, the Alicea court did not craft its own interpretation of Pennsylvania law but followed the thorough and well-reasoned opinion of the Pennsylvania Superior Court in Meritor Savings Bank, 582 A.2d 21 (Pa. Super. 1990), which was based on similar facts.
In Meritor Savings Bank, the mortgagor executed a mortgage and, at the same time, purchased disability insurance through the mortgagee bank to ensure that his mortgage payments would continue in the event he became disabled. See id. at 22. The bank’s disclosure form, dated the same day as the mortgage, stated that the mortgagor was purchasing disability insurance “in connection with your installment loan.” Id. (emphasis added by court). The disclosure form further stated that (1) coverage would be triggered in the event the mortgagor became “totally disabled”; (2) “[t]otal disability means that you can’t perform your job”; and (3) “[a]fter 30 days, [the policy] pays as long as you remain disabled during your loan term.” Id. However, the bank mistakenly procured insurance for the mortgagor that would cease after twelve months of disability unless the mortgagor was incapable of performing any j ob. See id. As a result, when the mortgagor later became unable to perform his job but could perform less strenuous work, the insurer denied coverage after twelve months, and the mortgage went into default. See id. When the mortgagee brought an action to foreclose, the mortgagor asserted a counterclaim for damages based on breach of the mortgagee’s obligation to provide disability insurance as described in its disclosure statement. See id. The trial court dismissed the counterclaim as improper under Rule 1148, but the Superior Court reversed, stating:
The different definitions of the disability insurance in *549the disclosure form and in the actual insurance contract form the basis of [mortgagors’] counterclaim. If, as [mortgagors] suggest, the Bank failed to provide them with the insurance it agreed to provide, and if as a result of this failure [mortgagors] have been unable to receive disability payments on their mortgage which has caused it to go into default, then [mortgagors] may be able to recover the sum due and clear their default.
The counterclaim made by [mortgagors] is an appropriate response to the bank’s mortgage foreclosure complaint. Counterclaims in mortgage foreclosure actions are governed by the terms of Pa.R.C.P. 1148, which provides:
A defendant may plead a counterclaim which arises from the same transaction or occurrence or series of transactions or occurrences from which the plaintiff’s cause of action arose.
In Mellon Bank, N.A. v. Joseph, 267 Pa. Super. 307, 406 A.2d 1055 (1979) the court affirmed an order striking the [mortgagors’] two counterclaims. The court ruled: “Here, the counterclaims [mortgagor] seeks to assert are remedial; they arose once the mortgage was in default, but were not part of, or incident to, the creation of the mortgage itself.” 406 A.2d at 1060. Unlike the counterclaims in Mellon Bank, the counterclaim in the instant case arose as part of, or incident to, the creation of the mortgage. The disclosure form, dated the same date as the mortgage document, states:
You, the Borrower, may buy Credit Life Insurance in connection with your installment loan. If you buy Credit Life Insurance, you may also buy Credit Disability *550Insurance if you are less than age 65.
(emphasis added.)
[Mortgagors’] counterclaim, based upon the Banks’ failure to provide the disability insurance for [mortgagors] outlined in the disclosure form, met the requirements of the rule. In connection with the mortgage the Bank undertook an obligation to provide a defined form of disability insurance. The Banks’ failure to meet this obligation is the proper subject of a counterclaim to the foreclosure action.
Id. at 23. Thus, the Superior Court held that the counterclaim for damages based on breach of a promise made “in connection with” the mortgage was “part of, or incident to, the creation of the mortgage itself.” Id. The court held that the counterclaim therefore could be asserted in the mortgage foreclosure action under Rule 1148. See id.
More recently, the Pennsylvania Superior Court has held that Rule 1148 permits assertion of a counterclaim for recoupment for the mortgagee’s failure to perform its obligations under the mortgage. See Green Tree Consumer Discount Co. v. Newton, 909 A.2d 811, 818 (Pa. Super. 2006) (where a home improvement financing contract was secured by a mortgage on the home, mortgagor was entitled to assert a counterclaim for recoupment for the mortgagee’s failure to perform the purchased home improvements; “[G]iven the mortgagors’ claims of fraud in the inducement of the sales contract and failure to perform under the contract, we cannot say that the facts support [mortgagee] to the point that it is entitled to summary judgment regarding the recoupment claims.”) (emphasis added).
*551HSBC has not attempted to distinguish Meritor Savings Bank or Green Tree Consumer Discount, both decided by the Pennsylvania Superior Court. HSBC cites several cases stating the general rule that permissible counterclaims must be “part of, or incident to, the creation of the mortgage.” HSBC’s Br. at 4-5. However, the above-cited authorities make clear that breach of a contractual term in a mortgage instrument satisfies that standard. HSBC has cited no authority to the contrary. Therefore, we conclude that Alicea correctly applied Pennsylvania law in holding that a mortgagee’s obligation to pay property taxes is “part of, or incident to, the creation of the mortgage” and that a claim for breach of that obligation is a proper counterclaim under Rule 1148.
VI. Legal Sufficiency of the Amended Counterclaim
A. Assertion of Claim Based on Breach of Express Contract
The allegations in the amended counterclaim make clear that the Walters’ claim is premised on breach of an express contractual provision in the mortgage. See answer to preliminary objections to amended counterclaim ¶ 5 (“[Paragraph 3 of the mortgage] clearly requires both the lender and the borrower to comply with terms contained in the document creating the mortgage. As stated in defendants’ counterclaim, this obligation creates a contractual relation from the creation of the mortgage.”). In HSBC’s preliminary objections to the Walters’ initial counterclaim, HSBC asserted only misjoinder of a cause of action under Pa.R.C.P. 1028(a)(5) based on the alleged impropriety of the counterclaim under Rule 1148. However, in its preliminary objections to the amended counterclaim, HSBC now asserts failure to comply with law or a rule of *552court under Pa.R.C.P. 1028(a)(2) and legal insufficiency (demurrer) under Pa.R.C.P. 1028(a)(4). As more fully set forth below, a claim for unjust enrichment cannot be maintained when the rights and obligations of the parties are governed by an express contract. Accordingly, we hold that HSBC’s preliminary objections must be sustained.
B. Effect of Express Contract on Claim for Unjust Enrichment
“An action based on unjust enrichment is an action which sounds in quasi-contract or contract implied in law.” Sevast v. Kakouras, 915 A.2d 1147, 1153 n.7 (Pa. 2007). “A quasi-contract imposes a duty, not as a result of any agreement, whether express or implied, but in spite of the absence of an agreement, when one party receives unjust enrichment at the expense of another.” AmeriPro Search, Inc. v. Fleming Steel Co., 787 A.2d 988, 991 (Pa. Super. 2001).
“The Supreme Court of Pennsylvania has concluded that ‘the quasi-contractual nature of unjust enrichment [is] inapplicable when the relationship between the parties is founded on a written agreement or express contract.’” Benefit Trust Life Ins. Co. v. Union Nat’l Bank, 116 F.2d 1174, 1177 (3dCir. 1985) (quoting Schott v. Westinghouse Elec. Corp., 259 A.2d 443, 448 (Pa. 1969)). “Dismissal of an unjust enrichment claim is appropriate upon a motion to dismiss when the relationship between the parties is founded on a written instrument.” Harold ex rel. Harold v. McGann, 406 F. Supp. 2d 562, 579 (E.D. Pa. 2005) (citations omitted).
In accordance with these principles, where the rights and obligations of the parties are governed by the terms of *553a mortgage, the parties may not maintain claims for unjust enrichment. See Benner v. Bank of America, N.A., 917 F. Supp. 2d 338, 360-61 (E.D. Pa. 2013).
Here, plaintiff has a direct contractual relationship with defendant that is governed by the written home mortgage agreement. The agreement addresses numerous topics, including defendant’s ability to charge for property inspections if plaintiff defaults — as he admittedly did — on his mortgage payments. Plaintiff has a right, of course, to challenge the reasonableness of those charges, but a theory of unjust enrichment is not the proper legal vehicle. The court will therefore dismiss [plaintiff’s claim for unjust enrichment].
Id. at 361; accord First Wisconsin Trust Co. v. Strausser, 653 A.2d 688, 693 n.2 (Pa 1995) (“[T]he existence of the written note and/or mortgage agreement precludes a claim of unjust enrichment.”).
Here, the Walters’ amended counterclaim makes clear that their claim for relief is based on express provisions of the written mortgage agreement. See amended counterclaim ¶ 5 (“[Paragraph 3 of the mortgage] clearly requires both the lender and the borrower to comply with terms contained in the document creating the mortgage. As stated in defendants’ counterclaim, this obligation creates a contractual relation from the creation of the mortgage.”). Based on the authorities cited above, the existence of the mortgage agreement governing the contractual relationship between HSBC and the Walters precludes assertion of a claim for unjust enrichment.
C. Pleading in the Alternative
Although it is sometimes permissible to plead unjust *554enrichment as an alternative to breach of contract, such alternative pleading “is plausible only when the validity of the contract itself is actually disputed, making unjust enrichment a potentially available remedy.” Grudkowski v. Foremost Ins. Co., _ Fed.Appx. _ (3d Cir. 2014) (citing cases) (“Here, [the parties] had a contractual relationship, the existence and validity of which are not challenged. Thus, [the plaintiff’s] claim for unjust enrichment, even when pled in the alternative, was appropriately dismissed.”); Montanez v. HSBC Mortgage Corp. (USA), 876 F. Supp. 2d 504, 516 (E.D. Pa. 2012) (“Because there is no dispute that the mortgage contract in this case was valid and enforceable, plaintiffs may not assert an unjust-enrichment claim premised on the absence of a contract. Thus, plaintiffs’ unjust-enrichment claim against HSBC mortgage is dismissed.”).
CONCLUSION
Based on the above-cited authorities, the Walters’ amended counterclaim must be stricken for failure to conform to law or rule of court under Pa.R.C.P. 1028(a) (2) and legal insufficiency (demurrer) under Pa.R.C.P. 1028(a)(4). However, the Walters will have a period of twenty (20) days from the date of this order to file a second amended counterclaim.
Wherefore we enter the following:
ORDER OF COURT
And now, this 11th day of June, 2014, upon consideration of the preliminaiy objections of plaintiff HSBC Bank USA, N.A. (“HSBC”) to defendants’ amended counterclaim (“preliminary objections”); the answer to plaintiff’s preliminary objections filed by defendants Douglas W. *555Walters, Patricia K. Walters, and Rosemarie Walters (the “Walters”); and the briefs and arguments submitted thereon, it is hereby ordered and decreed that HSBC’s preliminary objections are sustained. The Walters shall have a period of twenty (20) days from the filing date of this order to file a second amended counterclaim.
. Although this court is not bound by federal court opinions interpreting Pennsylvania law, we may consider federal cases as persuasive authority. See Cambria-Stoltz Enter. v. TNT Invs., 747 A.2d 947, 952 (Pa. Super. 2000).