
177 P.3d 551 (2007)
2007 OK 95
In re DE-ANNEXATION OF CERTAIN REAL PROPERTY FROM the CITY OF SEMINOLE, a Municipal Corporation
Kinslow Round-Up Inc., an Oklahoma Corporation; Jack C. and Bonnie M. Humphreys Trust No. 1; 8:32, Inc., a Non-profit Corporation; D. Kircher Investments, L.L.C.; The CFS Insurance and Securities Money Purchase Plan and Trust; Gary and Linda Bloomer, HWJT's; Modern Oil Co., Inc.; Bobby J. Williams and Mary E. Williams Living Trust; Joe K. and Alyce Ellis, HWJT's; Billy G. Clark; Hazel Reynolds; Jim and Robin Norris (Landlord), Julia Bellini and Leslie Hinds (Tenants); Eugene and Francis Warrensberg; and Sue Jarvis, Petitioners/Plaintiffs/Appellants,
v.
The City of Seminole, a Municipal Corporation Respondent/Defendant/Appellee, and
State of Oklahoma, ex rel., Oklahoma Tax Commission, Additional Defendant/Appellee.
No. 102,524.
Supreme Court of Oklahoma.
December 11, 2007.
As Corrected December 12, 2007.
Rehearing Denied February 7, 2008.
Michael J. Novotny, Hartzog, Conger, Cason & Neville, Oklahoma City, OK, for Appellants.
Ed Cadenhead, Elsener & Cadenhead, Seminole, OK, for Appellee City of Seminole.
Douglas Allen, General Counsel, Sean McFarland Assistant General Counsel, for Appellee Oklahoma Tax Commission.
EDMONDSON, V.C.J.
¶ 1 The questions before us are whether the trial court erred when it denied appellants' post-remand motions to: (1)order the City of Seminole to disgorge municipal sales tax revenues collected from annexed land and supervise the refund of those revenues to appellants who had successfully challenged the annexation; and (2)award appellants attorneys' fees and litigation costs for that challenge. We find the trial court correctly denied the motions as it did not have subject matter jurisdiction over the tax refund request and the City was immune from liability for payment of attorney's fees. We affirm the trial court's orders.
¶ 2 This is the second appeal involving the City of Seminole's unsuccessful efforts to annex certain territory into its city limits. In In re De-Annexation of Certain Real Property from the City of Seminole, 2004 OK 60, 102 P.3d 120, this. Court overturned the judicial declarations of the District Court and Court of Civil Appeals upholding the validity of the City's annexation of the subject property.
¶ 3 The essential facts of the underlying litigation follow. In December 1999 the City of Seminole (City) enacted Ordinance No. 917 *553 which annexed the land in question into its city limits. Appellants, primarily retail merchants in the annexed territory, challenged the ordinance. First, they petitioned the City to de-annex the land; upon denial they appealed to the district court, contending among other things that the enactment of the ordinance had violated the Oklahoma Open Meeting Act, 25 O.S.2001, §§ 301-314, because the language of the agenda posted for the meeting was insufficient. The trial court found in favor of the protesting appellants on that issue and set the matter for hearing as to whether City's Open Meeting violation was willful. Before that question was decided, however, City gave new notice and enacted Ordinance 941 which, by its terms, vacated Ordinance 917 and de-annexed, and then re-annexed, the property involved.
¶ 4 Appellants then challenged the validity of Ordinance 941 in district court and amended their pleadings and motions for summary judgment to incorporate arguments initially raised against the validity of Ordinance 917. Appellants did not file a claim for refund before the Oklahoma Tax Commission. Instead, they added the Commission as a party defendant and brought a third-party claim against it seeking a judicial declaration of their entitlement to refund of the municipal sales tax revenues collected by City from the annexed territory.
¶ 5 The trial court gave summary judgment to City regarding the validity of Ordinance 941 and certified its order for immediate appeal pursuant 12 O.S.2001, § 994(A). Concerns regarding Ordinance 917 were not addressed. Appellants appealed that order and presented several arguments against the validity of Ordinance 941. They also submitted arguments against Ordinance 917, contending both enactments should be declared invalid because Ordinance 941 is directly dependent on Ordinance 917 which, allegedly, was adopted in willful violation of the Open Meeting Act. They argued City's annexation had failed to meet the statutory jurisdictional prerequisites, the municipal sales tax had therefore been illegally imposed and City should be ordered to disgorge the tax revenues it had received from the annexed area.
¶ 6 The Court of Civil Appeals affirmed the District Court's order upholding Ordinance 941. Appellants sought certiorari, which we granted. We found all issues concerning Ordinance 917 to be outside the purview of that appeal; however, we upheld the argument of appellants that the 3-foot-wide strip of land connecting the annexed territory to the existing city limits of Seminole did not satisfy statutory contiguity standards, and we declared Ordinance 941 subject to invalidation for that reason. Accordingly, we reversed the trial court's order, vacated the opinion of the Court of Civil Appeals and remanded the matter to the District Court with directions to declare the ordinance inefficacious. In re De-Annexation of Certain Real Property from the City of Seminole, 102 P.3d at 132.
¶ 7 In proceedings on remand, the trial court declared both Ordinance 917 and Ordinance 941 invalid. Having prevailed in their efforts to invalidate the annexation, the appellants, the retail merchants who collected the tax, sought to obtain the refund of those tax revenues by presenting the motions at issue asking the court's "supervision of the disgorgement and refund process, and for attorneys' fees and costs." The court denied both motions.
¶ 8 Appellants argue here, as they did below, that the trial court erred by refusing to properly exercise its "unlimited original jurisdiction of all justiciable matters" granted by Art 7, Sec. 7(a), of the Oklahoma Constitution. They complain the trial court wrongly deemed itself powerless to resolve these matters and instead ceded its jurisdiction to the Oklahoma Tax Commission. Appellants submit that only the district court can determine these refund issues because the Oklahoma Tax Commission is a tribunal of limited jurisdiction which cannot render the equitable resolution necessary here. Only a court, they submit, can reach the issues necessary to balance the equities among these parties under these particular facts.
¶ 9 Appellees, City of Seminole and the Oklahoma Tax Commission, contend that the trial court did lack subject matter jurisdiction over appellants' claim for refund of the tax revenue because the right to apply for a refund of municipal sales taxes and the *554 remedy to enforce that right are statutory and the Oklahoma Tax Commission is the exclusive forum in which appellants could have pursued their refund quest. They argue that whether appellants are entitled to a refund or not, their request must be first addressed and decided by the Oklahoma Tax Commission, and that the district court properly denied judicial relief because the appellants failed to exhaust their administrative remedy.
¶ 10 We agree. Pursuant to the Oklahoma Municipal Taxation Code, 68 O.S. Supp.2003, §§ 2701-2706, any incorporated city or town is authorized to levy and collect a municipal sales tax. Title 68 O.S. Supp.2002, § 2702 provides that a municipality may then enter into a contractual agreement with the Oklahoma Tax Commission whereby the Commission will have all the powers of assessment, collection and enforcement and the Commission shall exercise those powers and remit the sales tax revenues to the municipality. Contracting municipalities are required to relinquish their administrative power over the control and enforcement of their taxes to the Commission, which will execute its administration and enforcement duties in the same manner it does regarding similar state taxes. Only in the event that an agreement specifically so provides, may municipalities administer a refund claim made by a taxpayer, and the agreement between the City of Seminole and the Commission did not so provide. Their agreement specifically states the Oklahoma Tax Commission will provide for the procedure and satisfaction of refund claims by taxpayers, as follows:
"The city agrees that refunds of city sales tax previously paid over to the city shall be paid from subsequent collections of the city sales tax. The Commission's determination of claims for refund shall be binding on the City."
¶ 11 The Uniform Tax Procedure Code, 68 O.S.2003, §§ 201-264, sets forth the procedures and remedies with respect to our tax laws and the administrative responsibilities of the Oklahoma Tax Commission in their enforcement. Its provisions govern resolution of the question of the proper forum for the refund claim at issue here.
Section 201 provides:
The purpose of this Article, which may be cited as the "Uniform Tax Procedure Code," is to provide, so far as possible, uniform procedures and remedies with respect to all state taxes. Unless otherwise expressly provided in any state tax law heretofore or hereafter enacted, the provisions of this article shall control and shall be exclusive.
¶ 12 Section 227 of Title 68[1] creates a right and an administrative remedy for a taxpayer's, claim for refund of a tax which has been paid erroneously through error of *555 fact, or computation, or misinterpretation of law, and sets out the procedure for that remedy. Under its provisions, a taxpayer may file a verified claim, with certain specific requirements, for payment of refund with the Tax Commission within three years of payment, and the Commission then has the duty to determine as soon as practicable what amount of refund, if any, is due the taxpayer and to approve or deny the claim by written notice. If the claim is denied, the taxpayer may, within thirty days, demand an administrative hearing before the Commission; if the taxpayer fails to file a demand for hearing, the claim is barred. If a timely demand for hearing is filed, the Commission shall set it within 60 days. Sections 228 and 225 provide that a taxpayer aggrieved by a ruling of the Oklahoma, Tax Commission has a right to bring a direct appeal to this Court.
¶ 13 Appellants had a statutory right and remedy for seeking a refund. They now ask this Court to create a judicial tax-refund remedy in addition to the statutory remedy that was available to them but which they did not pursue. Similar issues were before us in R.R. Tway, Inc. v. Oklahoma Tax Commission, 1995 OK 129, 910 P.2d 972, where a taxpayer asked us to create a judicial tax refund remedy in an appeal from the Tax Commission's denial of requested refund of county sales tax and its refusal to allow the county to be joined as a party in the refund proceeding. There we found taxpayer's refund application failed to meet the mandatory timeliness requirements of procedural tax statutes, and we made the following observations which are relevant here:
The right to apply for this refund of taxes and the remedy provided is based solely upon statutory authority. Generally, when a statute creates both a right and a remedy for its enforcement the statutory remedy is exclusive. Tate v. Browning-Ferris, Inc., 833 P.2d 1218, 1226 n. 36 (Okla.1992). . . . [E]ven when the tax is illegal we have recognized that a judicial remedy need not be created when the taxpayer had a statutory remedy available to obtain a refund of the protested tax but declined to use it. Stallings v. Oklahoma Tax Commission, 880 P.2d 912, 917-918 (Okla.1994). This is consistent with our rule that a court of equity will not be used to provide a remedy in tax refund matters when a statutory remedy was available to the taxpayer. Whig Syndicate, Inc. v. Keyes, 836 P.2d 1283, 1288 (Okla.1992).
Here the tax is legal when collected, and the refund is optional, with refunds going only to those who apply therefor. In effect, the refund is similar to a tax deduction or exemption reducing tax liability for those taxpayers who decide to use it. Tax exemptions and deductions are matters of legislative grace subject to the controlling authority of either the Constitution or the Oklahoma Constitution. [footnote omitted] Because the exemption is granted by, and within the power of, the Legislature, a court will not construe a tax exemption so as to enlarge its scope. Bert Smith Road Machinery Company, Inc. v. Oklahoma Tax Commission, 563 P.2d 641, 643 (Okla. 1977). This rule parallels that for tax remedies in that the Court has stated that it will not create a tax remedy when the Legislature has declined to do so. For example, in Adair v. Clay, 780 P.2d 650 (Okla.1988), cert. denied, 493 U.S. 1076, 110 S.Ct. 1125, 107 L.Ed.2d 1032 (1990), we said that: (1) the Oklahoma Constitution vests taxation exclusively in the power of the Legislature, (2) the right to a refund can arise only by legislative enactment, (3) only the Legislature can declare when taxes may be refunded absent a constitutional violation, and (4) that the Court was not authorized to step into the shoes of the Legislature and provide a remedy. Id. 780 P.2d at 655.
Similar reasoning also applies to Tway's argument that the Tax Commission's remedy is imperfect, and should thus be augmented by the Court. . . .
Tway's argument for this Court to enlarge upon the Commission's remedy rests upon the premise that a taxpayer should be allowed to ignore the provisions of such agreements. We decline to adopt such a view where no showing is made that the agreements violate either statute or the Oklahoma Constitution. . . .
From the record and argument before us it is clear that Tway had a refund *556 procedure provided by the Tax Commission to obtain a county tax refund by requesting refund(s) during the time the tax was in effect. Thus, what Tway is arguing for is a right of a taxpayer to disregard an available and effective refund procedure provided by the Commission, waiting a few years, and then seeking a refund. R.R. Tway, Inc. v. Oklahoma Tax Commission, 910 P.2d at 978-79.
¶ 14 Appellants rely on 68 OS § 227.1 for authority granting the trial court subject matter jurisdiction to adjudicate their claim for refund, but their argument is misplaced and unconvincing. That statute provides:
A. Notwithstanding the provisions of any state tax law relating to or providing for the refund of taxes erroneously paid, no taxpayer shall be entitled to nor be allowed any refund of taxes, penalties or interest paid pursuant to a state tax law subsequently determined by a final decision of a court of competent jurisdiction to be illegal or invalid under the Constitution or laws of this state or of the United States, unless such taxpayer shall have timely availed himself or herself of the remedies and procedures provided by Section 207,221, 226 or 815 of Title 68 of the Oklahoma Statutes to protest or challenge such tax, or, where the remedies provided by such sections are unavailable because the tax has not yet been assessed or proposed against such taxpayer, such taxpayer shall have brought an action for declaratory judgment in the district court to declare such tax or tax law illegal or invalid.
B. The provisions of this section shall apply to all state taxes, and shall also apply to the refund of any tax imposed by any municipality or county of this state where, under applicable law, such tax is collected by the Oklahoma Tax Commission.
¶ 15 Appellants claim they were properly before the court because their action to invalidate the annexation ordinances was a declaratory judgment action within the scope of § 227.1 of an action brought to "declare such tax or tax law illegal or invalid," but that is patently inaccurate. Appellants' action, of course, was brought to invalidate ordinances annexing property. The legality of the municipal sales tax was never an issue before the court. Section 227.1 does not apply to these circumstances. In fact, the statute reaffirms the necessity of a taxpayer's compliance with the requirements of exhaustion of Oklahoma Tax Commission administrative remedies, and the absolute necessity for taxpayers to comply with mandatory procedural requirements for claiming a refund imposed by the cited statutes.
¶ 16 Appellants contend we should sustain their position because this matter presents important of issues of public policy and equity. They argue City illegally effected this involuntary annexation as an improper "tax grab" by circumventing proper procedures which quashed political debate and thereby caused complex and expensive litigation to ensue in order to challenge the ordinances. They submit that City will be wrongfully enriched if it is allowed to retain the revenues exacted under the ordinance which was determined to be inefficacious, and that other municipalities will note that there is no price to pay for invalid annexation efforts. It is well settled, however, that equitable defenses will not block the requirements of mandatory procedural tax statutes. Apache Corporation v. State of Oklahoma ex rel. Oklahoma Tax Commission, 2004 OK 48, 98 P.3d 1061, 1064; R.R. Tway, Inc. v. Oklahoma Tax Commission, 1995 OK 129, 910 P.2d 972, 978; Whig Syndicate, Inc. v. Keyes, 1992 OK 95, 836 P.2d 1283, 1288.
¶ 17 Appellants also rely on Town of Balkan v. Village of Buhl, 158 Minn. 271, 197 N.W. 266 (1924), 158 Minn. 271, 197 N.W. 266, 35 A.L.R. 470, in support of their arguments, but that decision is not helpful to their cause as it is not relevant. There, one municipality's attempt to annex land of another municipality was immediately and successfully attacked by the state in quo warranto proceedings and adjudged invalid. The court determined that the village was not entitled to retain the tax money as the territory never became temporarily or de facto a part of the annexing village, but remained always in the territory of the town. *557 This is clearly not the situation presented in the instant case.
¶ 18 We have determined the trial court lacked subject matter jurisdiction over this request for tax refund. Whether appellants' claims for refund would be meritorious if they were presented to the Oklahoma Tax Commission, or whether appellants would even have standing to assert those claims in an administrative hearing, need not be addressed now.
¶ 19 Appellants contend that the trial court also erred in denying their motion for attorneys' fees and litigation costs for their successful challenge to the annexation. They argue the court had the inherent power to award them attorney's fees and that such an award was justified and appropriate under three exceptions to the American rule that each party should bear the costs of his or her own legal representation unless specifically recoverable under a statute or by contract. These exceptions, based on equitable considerations, are recognized by courts where an opponent has acted in bad faith, where a litigant has conferred a substantial benefit upon a class of persons or where the private attorney general rationale is found to warrant fee shifting.. Appellants claim that these exceptions as well as certain other theories support their claims and that the trial court should have granted their motion.
¶ 20 We find it unnecessary to consider the arguments appellants advance in support of their position at length because as a matter of law the City of Seminole is immune from liability for payment of attorneys' fees and litigation costs, for the annexation action. The annexation and de-annexation of territory by a municipality are legislative functions bestowed upon municipalities by the legislature. Title 11 O.S.2001, 21-101. Matter of De Annexation of Certain Real Property, 1983 OK 44, 662 P.2d 1375, 1376; City of Bethany v. District Court of Oklahoma County, 1948 OK 38, 191 P.2d 187, 188-189.
¶ 21 Title 51 O.S. Supp.2001, § 155 provides:
The state or a political subdivision shall not be liable if a loss or claim results from:
1. Legislative functions;
In McCracken v. City of Lawton, 1982 OK 63, 648 P.2d 18, we held the trial court erred when it awarded attorney's fees against the defendant City in a suit brought to declare a zoning ordinance invalid. Operators and owners of businesses affected by the new ordinance brought an action to challenge its validity. They also sought injunctive relief against the City's implementation of its regulations and moved the court to certify the suit as a class action and to award costs and attorney's fees against the City. The trial court ruled for the plaintiffs and found the ordinance void. The court also certified the class and awarded plaintiffs an attorney's fee. City appealed the orders certifying the suit as a class action and granting attorney's fees.
¶ 22 We determined the counsel fee award could not stand as it constituted a monetary recovery against a municipality for detriment occasioned in the exercise of its legislative capacity, contravening Section 155's unequivocal grant of immunity. Under the absolute terms of the statute, neither a political subdivision nor its officials may be subject, to liability for any acts or omissions in performing a legislative function; and we found it immaterial that the recovery sought was for a declaration of rights rather than for a money judgment in tort, as the thrust of the suit was to obtain monetary recovery for harm caused to property by a city's legislative
¶ 23 The orders of the trial court are affirmed:
¶ 24 WINCHESTER, C.J., EDMONDSON, V.C.J., OPALA, KAUGER, WATT, TAYLOR, COLBERT, REIF, JJ., Concur.
¶ 25 HARGRAVE, J., Disqualified.
NOTES
[1]  Title 68 O.S.2001 § 227 provides in relevant part:

(a) Any taxpayer who has paid to the State of Oklahoma, through error of fact, or computation, or misinterpretation of law, any tax collected by the Tax Commission may, as hereinafter provided, be refunded the amount of such tax so erroneously paid, without interest.
(b) Any taxpayer who has so paid any such tax may, within three (3) years from the date of payment thereof file with the Tax Commission a verified claim for refund of such tax so erroneously paid. * * *
(c) Said claim so filed with the Tax Commission, except for an amended report or return, shall specify the name of the taxpayer, the time when and period for which said tax was paid, the nature and kind of tax so paid, the amount of the tax which said taxpayer claimed was erroneously paid, the grounds upon which a refund is sought, and such other information or data relative to such payment as may be necessary to an adjustment thereof by the Tax Commission. It shall be the duty of the Commission to determine what amount of refund, if any, is due as soon as practicable after such claim has been filed and advise the taxpayer about the correctness of his claim and the claim for refund shall be approved or denied by written notice to the taxpayer.
(d) If the claim for refund is denied, the taxpayer may file a demand for hearing with the Commission. The demand for hearing must be filed on or before the thirtieth day after the date the notice of denial was mailed. If the taxpayer fails to file a demand for hearing, the claim for refund shall be barred.
(e) Upon the taxpayer's timely filing of a demand for hearing, the Commission shall set a date for hearing upon the claim for refund which date shall not be later than sixty (60) days from the date the demand for hearing was mailed. The taxpayer shall be notified of the time and place of the hearing. The hearing may be held after the sixty-day period provided by the subsection upon agreement of the taxpayer.
* * *
