
257 S.W.3d 402 (2008)
HUMANA INSURANCE COMPANY, Appellant,
v.
TEXAS HEALTH INSURANCE RISK POOL; Charles E. Baxter, Chairman of the Board of Directors of the Texas Health Insurance Risk Pool; the Texas Department of Insurance; and Mike Geeslin, Commissioner of Insurance, Appellees.
No. 13-06-333-CV.
Court of Appeals of Texas, Corpus Christi-Edinburg.
June 5, 2008.
*404 Douglas D. Dodds, Richard Kelley, Penny Hobbs, Karen L. Watkins, McGinnis, Lochridge & Kilgore, LLP, Austin, TX, for appellant.
Ann Hartley, Assistant Attorney General Financial Litigation Division, Larry Parks, Long, Burner, Parks & Sealy, Karen Pettigrew, Financial Litigation Division, Greg Abbott, Attorney General, Austin, TX, for appellees/cross-appellants.
Before Justices GARZA, BENAVIDES, and VELA.

OPINION
Opinion by Justice ROSE VELA.
Appellant, Humana Insurance Company ("Humana"), appeals from a final judgment in favor of appellees, Texas Health Insurance Risk Pool, Charles E. Baxter, Chairman of the Board of Directors of the Texas Health Insurance Risk Pool, (collectively "the Pool"), the Texas Department of Insurance and Mike Geeslin, Commissioner of Insurance (collectively "TDI"). Humana sought to recover excessive assessments it paid to the Pool in 1998 and 1999, pursuant to former article 3.77 of the Texas Insurance Code.[1] By its first three issues, Humana argues that the trial court erred in granting TDI's plea to the jurisdiction, and erred in denying Humana's summary judgment with respect to whether the Pool exceeded its statutory authority by denying Humana's request for a refund or credit on the amount of the assessment that it paid to the Pool. By its fourth issue it urges that the Pool's interpretation of former article 3.77 of the Insurance Code amounts to a "rule" as that term is used by the Texas Administrative Procedures Act. Humana urges by its sixth issue that the trial court had jurisdiction because the interpretation of former article 3.77 violated its right to due process and sovereign immunity was not implicated.[2]
TDI and the Pool appeal the trial court's judgment with respect to that portion of the judgment awarding Humana attorney's fees pursuant to the Uniform Declaratory Judgment Act because it was not a "prevailing party." The Pool further urges by cross issue that the trial court erred in *405 denying its plea to the jurisdiction because it is entitled to immunity and the relief Humana requested was a claim for damages, not declaratory relief. We affirm in part, and reverse and render in part.

I. Procedural History

A. The Parties
Humana filed suit against the Pool and TDI to recover payments it erroneously made to the Pool in excess of the assessments it should have paid pursuant to article 3.77 of the Texas Insurance Code. TEX. INS.CODE art. 3.77.[3] Humana claimed it was entitled to either a refund of monies it incorrectly paid or a credit against future assessments because of its overpayment. It asserted jurisdiction pursuant to the Uniform Declaratory Judgment Act ("UDJA") and section 2001.038 of the Administrative Procedures Act ("APA"). TEX. CIV. PRAC. & REM.CODE ANN. § 37.003 (Vernon 1997); TEX. GOV'T CODE ANN. § 2001.038 (Vernon 2000).
Humana sought a declaration that the Pool had no authority to retain overpayments and a declaration that the commissioner of insurance had violated the APA by failing to provide, by rule, necessary forms for the Pool to implement and collect assessments. Humana also urges that the Pool and TDI's interpretation of former article 3.77 constituted a "rule" pursuant to the APA. In addition to this relief, Humana sought a permanent injunction and judgment requiring the Pool to repay Humana the excessive amounts assessed or a judgment awarding Humana restitution or a credit against future assessments. All parties requested attorney's fees.

B. Former Article 3.77 of the Texas Insurance Code
This case centers on the meaning and application of former article 3.77 of the Texas Insurance Code, a statute that has not been widely interpreted. The purpose of article 3.77 is to provide health insurance benefits for uninsurable Texans through the creation, operation, and financing of the Texas Health Insurance Risk Pool. Former TEX. INS.CODE ANN. art. 3.77 § 1(a). The statute is designed to provide public access to high quality health care, to relieve the insurable population of the disruptive cost of sharing coverage, and to maximize reliance on strategies of managed health care proven by the private sector. Former TEX. INS.CODE ANN. art. 3.77 § 1(c).
The Pool has no rulemaking or adjudicatory authority. The commissioner of insurance is authorized to adopt any rules necessary to implement TDI's responsibilities under the insurance code. TEX. INS. CODE ANN. § 36.001 (Vernon Supp.2007). The commissioner may also adopt rules necessary and proper to implement operation of the Pool. See id.

C. Former Article 3.77 dictates how assessments are to be made by the Pool
In order to operate, the Pool is authorized to make interim and regular assessments on health insurers, such as Humana, who do business in Texas. Former TEX. INS.CODE art. 3.77 § 13(a). After the Pool estimates the funds it will need for the next year and determines the previous year's net losses, the Pool assesses an amount to cover its anticipated net losses. Under former article 3.77, the assessments are based on each insurance carrier's previous *406 year's assessable premiums. Former TEX. INS.CODE ANN. art. 3.77 § 13(a), (c). Each insurer's assessment is determined by the Pool's Board based on annual statements and other reports required by and filed with the Board. Id.
Individual assessments are made according to data received from the individual carriers themselves. To obtain that data, TDI created a reporting form for the carriers to use. The Pool sends the forms to all licensed insurance carriers. Humana is only one of many insurers who report assessable premiums and are assessed based on those reports.
The insurers assessed by the Pool vary from year to year. An insurer, included as part of the Pool one year, may not be part of the Pool for purposes of assessment the next year, for one reason or another. For instance, new insurance companies are formed and will be subject to assessment, while other insurance companies dissolve and will no longer be assessed. The aggregate assessable premiums data is used to apportion liability for the Pool's losses to be divided among the companies that could be properly assessed. If the reports filed by the insurers are wrong, the Pool's calculations may reflect those inaccuracies. The Pool does not necessarily check the underlying facts supporting the reports filed by the insurers. A letter accompanying the reporting form tells the insurers that no changes in the reported information will be permitted after submission of the data call form. The Pool's reporting form states, on its face, the importance of accuracy.
The Pool board is required to report to the commissioner of insurance the net loss as of December 31 of the previous year. The parties do not dispute that Humana did not seek a refund or credit until after the assessment period had closed. The parties also agree that the statute does not specify what should happen in situations like the one that occurred here.

D. Humana's Mistake Results in an Overpayment to the Pool.
In June 1999, Humana submitted its assessment form, based on its premiums at the end of 1998. Upon receiving the form, the Pool notified Humana of various errors in reporting. The Humana employee who completed the form added exempt premiums rather than subtracting them. In addition to this error, the Humana employee also failed to report excluded small group health insurance premiums for 1998. The reporting form specified that an insurer must complete another form to exclude small group health insurance premiums. In July 1999, Humana was notified that it reported incorrect small group premiums. These were the premiums Humana mistakenly did not exclude even though the statute specifically excepted them from assessment. Based on the reports received from information provided by Humana, the Pool assessed Humana $269,564 in 1998. This amount was $200,117 more than should have been assessed but for Humana's reporting errors.
In 1999, the same Humana employee once again failed to deduct small group insurance premiums from Humana's total reported amounts. The Pool assessed Humana $1,304,411 for 1999. Because of Humana's mistake, it was assessed $857,344 more than it should have been. In this appeal, the parties do not dispute the dollar amount of the errors or the fact that Humana made the reporting mistakes.

E. Humana Seeks a Refund or Credit.
It is not disputed that the Pool's assessments against Humana were correct based on the information Humana sent to the Pool. When Humana realized its errors over a two-year span, however, Humana *407 sought a refund or credit from the Pool. The Pool refused to refund the amount, stating that former article 3.77 section 13(c) of the Texas Insurance Code does not provide or allow for error correction of this kind after the assessment period is closed. Once the regular assessment information is gathered and final distribution of the assessment among companies is determined, the assessment is closed.

F. Humana Sues TDI and the Pool.
Humana filed suit against TDI and the Pool seeking declaratory relief, an order requiring the Pool to repay Humana amounts assessed by refund or credit, and attorney's fees. After motions for summary judgment were filed by all parties and pleas to the jurisdiction were filed by TDI and the Pool, the trial court entered orders that, when combined, disposed of all parties and issues. Specifically, the trial court entered a partial summary judgment in July 2004:
1) granting TDI's first amended plea to the jurisdiction,
2) denying Humana's motion for summary judgment,
3) granting the Pool's partial motion for summary judgment agreeing that the Pool did not exceed its statutory authority in denying Humana's request for credit or refund,
4) granting summary judgment that the Pool's interpretation of former article 3.77 is not a "rule" pursuant to section 2001.038 of the Texas Government Code.
In December 2004, the trial court entered another order denying Humana's motion for summary judgment based on the constitutionality of former article 3.77, and granting TDI's and the Pool's motion for summary judgment. The trial court also denied Humana's request for declaratory relief. Ultimately, the trial court: (1) denied Humana's motion for summary judgment; (2) granted the Pool's motion for summary judgment determining that the Pool did not exceed its authority in its decision to deny Humana's request for credit or refund; (3) held that the Pool's interpretation of article 3.77 was not a rule; (4) did not rule on the Pool's plea to the jurisdiction; and (5) granted TDI's plea to the jurisdiction specifically stating that neither the interpretation of article 3.77 nor the promulgation of forms was a "rule" pursuant to section 2001.038 of the government code. The court also entered an order stating that Humana's right to due process under the United States and Texas constitutions had not been violated. Finally, the trial court awarded attorney's fees to all parties.

II. Analysis

A. Standard of Review
The proper standard of review is de novo because all of the issues to be resolved in this case are questions of law. Valence Operating Co. v. Dorsett, 164 S.W.3d 656, 661 (Tex.2005) (a summary judgment is reviewed de novo); Tex. Dep't of Parks & Wildlife v. Miranda, 133 S.W.3d 217, 228 (Tex.2004) (whether a trial court has subject matter jurisdiction is a question of law that is reviewed de novo).
All parties filed motions for summary judgment. When all parties file motions for summary judgment and one is granted and one is overruled, we consider the summary judgment evidence presented by both sides and determine all questions presented. Valence Operating Co., 164 S.W.3d at 661.

B. Jurisdiction
By its first issue, Humana argues that the trial court erred by sustaining TDI's plea to the jurisdiction. By its cross issue, the Pool argues that the trial court should have granted its plea to the jurisdiction. *408 Humana pleaded that the trial court had jurisdiction over its claims pursuant to both the Uniform Declaratory Judgment Act and section 2001.038 of the Texas Government Code. See TEX. CIV. PRAC. & REM.CODE ANN. § 37.003 (Vernon 1997); TEX. GOV'T CODE ANN. § 2001.038 (Vernon 2000). The trial court granted TDI's plea, stating: "Neither the `interpretation' of TEX. INS.CODE, art. 3.77, nor the promulgation of forms constitutes a `rule' within the meaning of TEX. GOV'T CODE § 2001.038." Humana urges that TDI violated the APA by failing to employ its rulemaking procedures to provide the necessary forms to allow correction of errors of the type which occurred here. Humana also sought a declaration that the practice TDI engaged in was a de facto "rule" not promulgated in accordance with the APA.

1. Jurisdiction Over Claims for Declaratory Relief
By cross-issue, the Pool urges that the trial court erred in failing to grant its plea to the jurisdiction because Humana's pleadings merely masqueraded as a declaratory judgment action. The Pool affirmatively pleaded that it had sovereign immunity to the extent that Humana was attempting to use a declaratory judgment action as a vehicle to recover money from the Pool. As a quasi-governmental agency, the Pool has sovereign immunity unless it is waived by the Legislature. Gen. Servs. Comm'n v. Little-Tex Insulation Co., 39 S.W.3d 591, 594 (Tex.2001). Sovereign immunity protects the State from lawsuits for damages. Id. When a plaintiff merely seeks a declaration of rights pursuant to a statute, such action is not subject to a sovereign immunity defense. Hawkins v. El Paso First Health Plans, Inc., 214 S.W.3d 709, 716-17(Tex.App.-Austin 2007, pet. filed). Here, Humana's pleadings ask for declaratory relief to resolve alleged contradictory positions taken by the Pool regarding its authority to make adjustments to assessments, non-compliance with the APA, and the constitutionality of former article 3.77. With respect to adjustments on its assessment, Humana is seeking money damages and not declaratory relief. Where a party files a suit for declaratory relief but seeks monetary damages, sovereign immunity bars the suit. Tex. Natural Res. Conservation Comm'n v. IT-Davy, 74 S.W.3d 849, 855-56 (Tex.2002). The Pool's plea to the jurisdiction should have been granted to the extent that Humana's claims for declaratory relief under the UDJA and section 2001.038 of the Texas Government Code sought damages. The Pool's cross-issue is sustained. For these reasons as well, the trial court properly sustained TDI and the commissioner's plea to the jurisdiction.

2. Did the Pool exceed its authority?
Humana also urges that sovereign immunity is inapplicable because the Pool exceeded its authority by assessing Humana the amount it did and refusing to refund the amount Humana overpaid due to Humana's own calculation errors. Humana urges that the Pool committed an ultra vires act by not excluding small group health insurance premiums. Sovereign immunity does not bar a suit when a State official commits an unlawful act or a State agent acts pursuant to an unconstitutional law. See Fed. Sign v. Texas S. Univ., 951 S.W.2d 401, 404 (Tex.1997); Cobb v. Harrington, 144 Tex. 360, 190 S.W.2d 709, 712 (1945). Both sides seek a construction of former article 3.77 that would result in resolving the case in their favor. Specifically, Humana urges that the Pool exceeded its authority by allowing small group premiums to be included in Humana's assessment even though small group premiums are specifically excluded from inclusion in the assessment by statute. *409 Section 13(d) states, in pertinent part:
The assessment imposed against each insurer shall be in an amount that is equal to the ratio of the gross premiums collected by the insurer for health insurance in this state during the preceding calendar year, except for Medicare supplement premiums subject to Article 3.74 and small group health insurance premiums subject to Articles 26.01 through 26.76, to the gross premiums collected by all insurers for health insurance, except for Medicare supplement premiums subject to Article 3.74 and small group health insurance premiums subject to Articles 26.01 through 26.76, in this state during the preceding calendar year. (emphasis added).
The Pool urges that while small group premiums are excepted from assessment, Humana had the opportunity to properly complete the necessary forms to exclude those funds from the amount assessed.
Humana correctly argues that section 13 of former article 3.77 reflects legislative intent to base assessments on premiums collected, excluding those collected for small group health insurance. It urges that because the statute excludes small group health insurance premiums, the Pool engaged in an ultra vires act by allowing an assessment that included those premiums. The Pool counters that the reporting form specifically mentions small group health insurance premiums and directs insurers how to handle those premiums. The Pool urges that there was a form in place to report and exclude small group health insurance premiums. We agree with appellees that TDI and the Pool did not act outside their authority. Rather, they refused a refund to Humana because there was no statutory authority for them to do so after the assessment period closed. Further, the forms were in place to exclude small group premiums. Had Humana correctly completed the forms, the small group health premiums would have been excluded.

3. Constitutionality of Former Article 3.77
The trial court granted summary judgment in favor of TDI and the Pool on the issue concerning the constitutionality of former article 3.77. Humana urges that article 3.77 is unconstitutional for two reasons. First, Humana contends that the statute is unconstitutional, as applied, because the assessment was, in fact, a tax and not a fee. Second, Humana argues that the statute provides neither a pre-deprivation nor post-deprivation remedy that comports with due process.
A suit seeking a declaratory judgment that a state agent is acting pursuant to an unconstitutional law is not an action against the state barred by sovereign immunity. See Rylander v. Caldwell, 23 S.W.3d 132, 136 (Tex.App.-Austin 2000, no pet.). Declaratory relief is the proper remedy when challenging the constitutionality of a statute and a plaintiff is not required to obtain the State's consent before filing a declaratory judgment action. Id. In reviewing the constitutionality of this statute, we presume that the legislature intended to comply with the constitution and to advance public interest. See TEX. GOV'T CODE ANN. § 311.021 (Vernon 2005). The purpose of former article 3.77 is to provide a mechanism for providing health insurance to medically uninsurable Texans. Humana cites McKesson Corp. v. Div. of Alcoholic Beverages and Tobacco, 496 U.S. 18, 110 S.Ct. 2238, 110 L.Ed.2d 17 (1990) as authority for its constitutional challenge. In McKesson, the court held that if a state places a taxpayer under duress to promptly pay a tax when due and allows only a post-payment challenge, the due process clause obligates the state *410 to provide relief to rectify any unconstitutional deprivation. Id. at 38-39, 110 S.Ct. 2238.
Here, however, the Pool did not exact an unlawful tax. It assessed a fee pursuant to a statute and relied on information given to it by Humana. Humana made a mistake that it wanted to correct. The trial court determined that the Pool did not exceed its statutory authority in denying the refund because the assessment was correct based upon the numbers Humana reported to the Pool.
Humana also argues that H. Rouw Co. v. Tex. Citrus Comm'n, 151 Tex. 182, 247 S.W.2d 231, 234 (1952) and City of Houston v. Harris County Outdoor Adver. Ass'n, 879 S.W.2d 322, 326 (Tex.App.-Houston [14th Dist.] 1994, writ denied) support its argument that the assessment is actually a tax. In H. Rouw Co., the court distinguished "fees" from "taxes" based upon the primary purpose for which they were proposed:
The principle of distinction generally recognized is that when, from a consideration of the statute as a whole, the primary purpose of the fees provided therein is the raising of revenue, then such fees are in fact occupation taxes, and this regardless of the name by which they are designated. On the other hand, if its primary purpose appears to be that of regulation, then fees levied are license fees and not taxes.
247 S.W.2d at 234.
In H. Rouw, the primary purpose of the statute was to raise revenues in excess of the amount needed to regulate the industry. Id. Here, former article 3.77 limits the Pool to collecting assessments only when there is a premium shortfall. Collected funds do not go into the general revenue. The funds are used solely to comply with the mandate of the statute, which is to provide health care insurance for the uninsurable.
In City of Houston, appellees brought suit alleging that the city violated their constitutional rights by charging excessive operating permit fees. 879 S.W.2d at 325. The issue was whether the fees for off-premises operating permits were an impermissible occupation tax rather than a valid license fee. Id. There, the court upheld the trial court's findings that the fees were excessive and in the nature of an unlawful occupation tax. The court also found there was no way to challenge it. Id. at 333-34.
Here, on the other hand, the amounts assessed are clearly formulated to assure that all insurers are treated equally and that the program, which meets an important need for Texans, is sufficiently funded. The mistake here does not rise to the level of a constitutional deprivation.
This case is more akin to Texas Boll Weevil Eradication Found. v. Lewellen, 952 S.W.2d 454, 457 (Tex.1997). There, the supreme court held that the assessments levied by the appellant were regulatory fees, not taxes. Id. The legislature authorized the agriculture commissioner to certify a nonprofit organization to create a foundation to eradicate the boll weevil. Id. The growers argued that the fees assessed against them were prohibited occupation taxes, while the Foundation argued the fees were regulatory fees. Id. at 460-461. The supreme court stated that the critical issue was whether the assessment is intended to raise revenue in excess of that needed for regulation. Id. at 461. The court found that because the assessments levied were in an amount needed to fund the eradication program and were used for that purpose, they were not taxes. Id. at 462.
Similarly, the amounts assessed in this case were for the sole purpose of operating *411 the Pool. We agree with the trial court that the assessments made pursuant to former article 3.77 are not taxes. The trial court correctly granted summary judgment in favor of TDI and the Pool. We overrule issue six.

III. Attorney's Fees

A. Background
By cross-issues, TDI and the Pool complain that the trial court erred in granting attorney's fees to Humana in this case. They contend that Humana is not entitled to receive attorney's fees because Humana was not a "prevailing party." The parties do not contest the amount of the fees awarded, only the trial court's discretion to award any fees to Humana.

B. Standard of Review
Whether an award of attorney's fees is equitable and just is a question of law for the trial court to decide. Bocquet v. Herring, 972 S.W.2d 19, 21 (Tex.1998). Trial courts have discretion to award reasonable and necessary attorney's fees as are equitable and just for claims brought under the UDJA. TEX. CIV. PRAC. & REM.CODE ANN. § 37.009 (Vernon 1997). In proper cases, a trial court may award attorney's fees to a non-prevailing party. See e.g. Cartwright v. Cologne Prod. Co., 182 S.W.3d 438, 447 (Tex.App.-Corpus Christi 2006, pet. denied).

C. Analysis
Here, the trial court correctly granted TDI's plea to the jurisdiction. The Pool's plea to the jurisdiction should also have been granted. Humana's declaratory judgment action was primarily for the recovery of its monetary losses. Immunity was not waived for Humana's claims for damages. To the extent that Humana requested declaratory relief with regard to its claims that TDI and the Pool committed either unconstitutional or ultra vires acts, its claims also failed. Humana did not prevail on any ground sought. Humana was a plaintiff attempting to get relief that was primarily monetary. Because its claim against entities clothed with immunity failed, we find that attorney's fees were not warranted. The attorney's fees awarded under the particular circumstances of this case were inequitable and unjust. The assessment and funding of the Pool is to provide health insurance for the uninsurable. While a trial court has discretion to award attorney's fees to those parties who do not prevail in a declaratory judgment action, here, declaratory relief was not available because monetary damages were sought. We are mindful that this was a case of first impression and that Humana brought to the forefront a potential need for a rule to cover the circumstances occurring here. However, it would be both inequitable and unjust to require the entities clothed with immunity to pay substantial attorney's fees merely because they defended this lawsuit, in which they ultimately prevailed on all issues. We sustain both the Pool and TDI's issue with regard to attorney's fees.

IV. Conclusion
We hold that TDI's plea to the jurisdiction was properly granted and the Pool's plea to the jurisdiction should have been granted by the trial court. We overrule Humana's issues one through four and issue six. We affirm the trial court's judgment with regard to TDI and grant the Pool's cross-issue regarding jurisdiction. We further sustain the Pool and TDI's cross-issues with regard to the attorney's fees. The trial court's award of attorney's fees to Humana is reversed and we render judgment that Humana take nothing.
NOTES
[1]  Former article 3.77 of the insurance code establishes the Texas Health Insurance Risk Pool, an agency that provides health insurance benefits to uninsurable Texans.
[2]  Humana claims by its fifth issue that its claim was not barred by estoppel or quasi-estoppel. Humana acknowledges in its brief that Appellees abandoned those defenses, so we need not address this issue.
[3]  After this lawsuit was filed, the Legislature repealed Texas Insurance Code article 3.77 as part of the legislature's recodification project. Act of May 20, 2003, 78th Leg., R.S., ch. 1274, sec. 26(a)(1), 2003 Tex. Gen. Laws 3611, 4138. The text can now be found in Chapter 1506 of the Texas Insurance Code. Because former article 3.77 was the statute at issue, we will refer to it rather than the recodification.
