Ellington, Justice. Richard Andrew Justice brought a claim against the Georgia Department of Public Safety (“DPS”) for breach of an employment contract by failing to pay him for overtime hours under provisions of the federal Fair Labor Standards Act (“FLSA”), 29 USC § 201 et seq., that allegedly were incorporated into the employment contract. The narrow question before us in this case is whether Justice has shown the existence of a written contract such that his complaint survives DPS’s motion to dismiss under OCGA § 9-11-12 (b) (1) on sovereign immunity grounds. We conclude that Justice has shown the existence of a written contract with DPS on which his action is based, thereby establishing a waiver of sovereign immunity under the ex contractu clause of the Constitution of the State of Georgia. See Ga. Const. of 1983, Art. I, Sec. II, Par. IX (c) (“The state’s defense of sovereign immunity is hereby waived as to any action ex contractu for the breach of any written contract now existing or hereafter entered into by the state or its departments and agencies.”). We also conclude that the question of whether the FLSA obligations were part of that written contract is not a sovereign immunity question, but is a merits question that was not properly before the trial court on DPS’s motion to dismiss pursuant to OCGA § 9-11-12 (b) (1). Accordingly, we affirm the judgment of the Court of Appeals in part, specifically to the extent it determined that sovereign immunity was waived, and we vacate that judgment in part, to the extent it determined – prematurely in the context of a motion to dismiss for lack of subject-matter jurisdiction – that the FLSA obligations were part of the written contract. The case is remanded for further proceedings consistent with this opinion. 1. Factual and Procedural Background Justice’s amended complaint alleged that from 2014 to 2020, he and 400 similarly situated putative class members were hired as state troopers with the Georgia State Patrol, were required to attend trooper school, and collectively were underpaid approximately $4,782,848 in wages for overtime hours worked during trooper school. The complaint alleged that DPS sent Justice a “written offer of employment” containing the terms of employment including salary and start date; that the written offer was “signed by an agent of the State of Georgia who had sufficient authority to make written offers of employment”; that Justice accepted the written offer “in writing” and signed more documentation that was “incorporated into his employment agreement”; that the agreement “included all of the necessary terms of a written contract, including offer, acceptance, and consideration”; that pursuant to the agreement, Justice was to receive overtime compensation, which was “contractually referred to as ‘FLSA Time’”; that DPS “breached its written contract with Justice by failing to compensate him for the . . . FLSA Time he accrued”; and that the “claims of the individual class members are similar to” Justice’s claim. DPS moved to dismiss pursuant to OCGA § 9-11-12 (b) (1) due to lack of subject-matter jurisdiction, based solely on sovereign immunity and the alleged failure of Justice to meet his burden of establishing a waiver of sovereign immunity. Justice responded that the offer of employment, his acceptance, and certain contemporaneously executed documents constituted a written contract such that the State waived its sovereign immunity. The trial court allowed limited discovery, and Justice submitted the documents that he claimed constituted a written contract between DPS and himself. Specifically, a December 12, 2018, e-mail from Diana Stephens, the Human Resources Employment Manager for DPS, stated, “Please see the attached PDF File for your final offer of employment for the Trooper position in the 106th Trooper school. Please e-mail me back as receipt and confirmation of your acceptance of this final offer.” The attachment was a letter signed on behalf of DPS by the Director of its Human Resources Division, which read as follows: Congratulations! This letter serves as a final offer of employment as a Trooper Cadet, and is your invitation to participate in the Georgia State Patrol (GSP) 106th Trooper School effective January 6, 2019. Your salary will be $36,110.00 annually. You will receive follow up information within the next few weeks regarding report time and new hire information. Again, you are congratulated for being selected to begin the final phase of becoming a [GSP] Trooper. Your successful completion of all the requirements of the Cadet Training Program is essential to continuing in Trooper School and ultimately graduating as a [GSP] Trooper. This offer is contingent upon POST approval of your law enforcement application. As a reminder, you will be given a PT test on the beginning date of the GSP 106th Trooper School. Your failure to pass this PT test will result in your immediate dismissal from the GSP 106th Trooper School. If you have questions regarding this correspondence, please call Diana Stephens at [a redacted phone number]. I thank you for your continued interest in employment with [DPS] and wish you well as you begin Trooper School. (Emphasis in original.) Justice replied to Stephens’s e-mail the same day, stating “I accept this offer. Thanks so much[.]” And Stephens replied, “ Thank you and good luck with all, Diana.” Justice also filed an affidavit attesting that he subsequently received “‘new hire information’” from DPS, including a “Policy Acknowledgment Form” and two documents denominated “Understanding Use of FLSA Compensatory Time.” Those documents contained blanks for the employee’s signature, and Justice signed the documents on December 16, 2018.[1] By e-mail dated December 31, 2018, DPS acknowledged receipt of the completed “New Hire packet.” After a hearing, the trial court granted DPS’s motion to dismiss Justice’s amended complaint, finding that the documents submitted by Justice were not sufficient to waive sovereign immunity because they did not constitute a valid written contract and, even if they did, the agreement was only to begin employment at the stated salary and did not involve a meeting of the minds to include FLSA overtime compensation provisions. In reversing the trial court’s ruling, the lead opinion of the Court of Appeals, relying on State of Ga. v. Fed. Defender Program, 315 Ga. 319, 329-333 (3) (a) (882 SE2d 257) (2022), concluded that, “[b]ased on the contemporaneously executed documents exchanged between Justice and DPS, both physical and electronic, . . . the parties entered into a contract for at-will employment that included certain FLSA provisions” and, thus, that “DPS waived sovereign immunity for Justice’s breach of contract claim related to those agreements, and the trial court erred by finding otherwise.” Justice v. Dept. of Public Safety, 368 Ga. App. 593, 599 (3) (b) (890 SE2d 486) (2023) (Doyle, P.J.). Two members of the Court of Appeals panel concurred specially as to that subdivision of the lead opinion “because as written, it might be construed to waive sovereign immunity more broadly than . . . permitted under existing law.” Justice, 368 Ga. App. at 600 (Gobeil, J., joined by Judge Phipps). But the special concurrence agreed that “Justice proved the existence of a written contract (incorporating the applicable FLSA provisions) sufficient to waive DPS’s sovereign immunity for Justice’s breach of contract claim.”[2] Id. at 600. DPS petitioned this Court for a writ of certiorari, and we granted the petition. 2. Legal Background “[S]overeign immunity of a State agency is not an affirmative defense, going to the merits of the case; instead it raises the issue of the trial court’s subject matter jurisdiction to try the case.” Fed. Defender, 315 Ga. at 343 (3) (f) (citation and punctuation omitted). “[S]overeign immunity . . . like various other rules of jurisdiction and justiciability . . . is concerned with the extent to which a case properly may come before a court at all.” McConnell v. Dept. of Labor, 302 Ga. 18, 18-19 (805 SE2d 79) (2017) (citation and punctuation omitted). Therefore, the applicability of sovereign immunity cannot be pretermitted, but “is a threshold determination, and, if it does apply, a court lacks jurisdiction over the case and, concomitantly, lacks authority to decide the merits of a claim that is barred.” Id. at 19. More specifically, “[s]overeign immunity is a threshold issue that must be addressed prior to resolving the merits of [Justice's] breach of contract claim.” Worth County School Dist. v. Tibbetts, 319 Ga. 103, 107 (2) (902 SE2d 558) (2024). “Because sovereign immunity is jurisdictional, it requires the plaintiff to prove any waiver thereto and is properly raised as a defense under OCGA § 9-11-12 (b) (1).” Fed. Defender, 315 Ga. at 327 (3) (citation and punctuation omitted; emphasis in original). When considering a motion to dismiss on sovereign immunity grounds under OCGA § 9-11-12 (b) (1), “a trial court is not confined to the allegations of the complaint but is authorized to ‘hear the matter on affidavits presented by the respective parties, [or to] direct that the matter be heard wholly or partly on oral testimony or depositions.’ OCGA § 9-11-43 (b).” Fed. Defender, 315 Ga. at 327 (3). The Georgia Constitution provides in Article I, Section II, Paragraph IX (e), that the State’s sovereign immunity extends to “all of its departments and agencies” and can only be waived by a constitutional provision or an act of the General Assembly specifically providing for such a waiver and the extent thereof. See Fed. Defender, 315 Ga. at 326-327 (3). Because Justice brought his lawsuit against DPS, an agency of the State, sovereign immunity bars the action unless it comes within some waiver. See OCGA § 3510 2-2 (“There is created a Department of Public Safety.”). Justice contends that sovereign immunity for the specific type of claim he is making has been waived under the ex contractu clause. Indeed, “[o]ne of the exceptions to the defense of sovereign immunity is for ‘any action ex contractu for the breach of any written contract . . . entered into by the state or its departments and agencies.’ Ga. Const. of 1983, Art. I, Sec. II, Par. IX (c).” Fed. Defender, 315 Ga. at 327 (3). See also OCGA § 50-21-1 (a) (“The defense of sovereign immunity is waived as to any action ex contractu for the breach of any written contract . . . entered into by the state, departments and agencies of the state, and state authorities.”). To meet his burden of proving a waiver of sovereign immunity, Justice was required to “show that the contract sought to be enforced is in writing and contains all of the terms necessary to constitute a valid contract.” Fed. Defender, 315 Ga. at 327 (3) (citation and punctuation omitted). And “general provisions of contract law cannot be applied by the courts to create a waiver of sovereign immunity by means other than by written contract.” Ga. Dept. of Labor v. RTTAssoc., 299 Ga. 78, 86 (3) (786 SE2d 840) (2016). 3. Analysis The alleged waiver of sovereign immunity at issue applies to “any action ex contractu for the breach of any written contract[.]” Ga. Const. of 1983, Art. I, Sec. II, Par. IX (c). And the only question properly before us is whether there existed a written contract between the parties sufficient to waive sovereign immunity. “ To constitute a valid contract, there must be parties able to contract, a consideration moving to the contract, the assent of the parties to the terms of the contract, and a subject matter upon which the contract can operate.” OCGA § 13-3-1. “Unless all of these essential terms are in writing, there is no enforceable written contract for sovereign immunity purposes.” Fed. Defender, 315 Ga. at 333 (3) (c). Each of the essential elements of a contract is present in writing in this case. The parties’ employment contract had a definite written subject matter on which it could operate, specifically Justice’s employment as a state trooper. Both parties were able to contract. The written offer letter was signed by the Director of DPS’s Human Resources Division.[3] The amended complaint alleges that the letter was signed by an agent with sufficient authority to make the offer, and DPS has not denied that allegation or offered evidence to the contrary. And Justice certainly was able to contract on his own behalf, absent any evidence to the contrary. Both parties gave their written assent to the terms of the contract. The offer letter was transmitted with a written request for Justice to e-mail “back as receipt and confirmation of your acceptance of this final offer.” On the same day, Justice sent a written reply – “I accept this offer” – in an e-mail with his name and e-mail address appearing at the top. The offer letter’s inclusion of a stated salary in return for Justice’s training and service as a state trooper was sufficient consideration, as the only consideration required to support an at-will employment agreement is “provi[sion] for the payment of wages in exchange for the satisfactory performance of job duties.” Balmer v. Elan Corp., 278 Ga. 227, 228 (2) (599 SE2d 158) (2004). The parties’ written employment contract was valid and enforceable even though it was formed through electronic means and was terminable at will. Because neither the e-mail exchanges between DPS and Justice nor anything else specified a definite length of employment, despite the offer letter’s reference to an annual salary, it is true that their employment agreement was terminable at-will. See Parker v. Crider Poultry, 275 Ga. 361, 362 (1) (565 SE2d 797) (2002) (“An employment contract containing no definite term of employment is terminable at the will of either party.”); Ikemiya v. Shibamoto America, Inc., 213 Ga. App. 271, 273 (1) (444 SE2d 351) (1994) (“[D]ocuments referring to an annual salary merely establish the total amount payable during a twelvemonth period and not the duration thereof. The computation of the salaries on an annualized basis does not turn this compensation term into a duration term.” (citation and punctuation omitted)). Even so, “an at-will employment relationship can give rise to certain contractual rights,” and “a promise of future compensation made at the beginning of the employment relationship” may be enforceable. O’Connor v. Fulton County, 302 Ga. 70, 71 (1) (805 SE2d 56) (2017) (citation and punctuation omitted). Moreover, under general principles of contract law, a contract can be “memorialized in an email for purposes of determining whether the State has waived its sovereign immunity,” and the Georgia Uniform Electronic Transactions Act, OCGA § 10-12-1 et seq., applies to a State agency where, as here, “the context and surrounding circumstances, including the parties’ conduct, demonstrate that the parties agreed to conduct the particular transaction at issue by electronic means.” Fed. Defender, 315 Ga. at 330-333 (3) (a), (b) (citation and punctuation omitted). Accordingly, the Court of Appeals’ lead opinion and the special concurrence in this case correctly agreed that the e-mail exchanges between DPS and Justice on December 12, 2018, including the offer letter from DPS, showed the existence of a written at-will employment contract that included Justice’s start date and salary. See Justice, 368 Ga. App. at 598-599 (3) (a), (b); id. at 600 (Gobeil, J., concurring specially). Because Justice’s claim arises from his employment contract, and that contract is written, sovereign immunity is waived for his action based on the breach of the written employment contract. Although the Court of Appeals correctly held that DPS waived sovereign immunity for the breach of the written at-will employment contract that DPS and Justice entered on December 12, 2018, the Court of Appeals improperly considered whether DPS was contractually obligated to comply with the FLSA. And the trial court improperly determined whether, assuming the existence of a valid written contract, it included FLSA overtime compensation provisions. The latter question goes to the merits of Justice’s action and thus was not relevant to sovereign immunity and was not appropriate to consider on a motion to dismiss based on an asserted lack of subject-matter jurisdiction. On remand, however, the trial court will be authorized to address the merits of the case in response to the pleadings and motions other than the motion to dismiss on the ground of sovereign immunity. Those merits issues may include, but are not limited to, whether the FLSA obligations became part of Justice’s written employment contract and whether DPS breached contractual terms that Justice alleges are part of the written contract. Judgment affirmed in part and vacated in part, and case remanded. All the Justices concur.