
186 S.W.3d 582 (2006)
Sandra Lee SELIGMAN-HARGIS, Appellant,
v.
Larry HARGIS, Appellee.
No. 05-03-01818-CV.
Court of Appeals of Texas, Dallas.
January 5, 2006.
Rehearing Overruled March 23, 2006.
*584 J. Darlene Ewing, Law Offices of J. Darlene Ewing, Dallas, for appellant.
Chris Lake, Georganna L. Simpson, Law Office of Georganna L. Simpson, Dallas, for appellee.
Before Justices MORRIS, WHITTINGTON, and O'NEILL.

OPINION
Opinion by Justice O'NEILL.
Appellant Sandra Lee Seligman-Hargis (Mother) appeals an agreed final decree of divorce. In two issues, Mother generally asserts the trial court did not have jurisdiction to include in its final decree orders regarding child custody. For the following reasons, we reverse in part and dismiss for want of jurisdiction in part.
In February 2002, Mother filed for divorce in Texas. At that time, Mother, Father and their two children were all living in Germany because Father, an employee of the Department of Defense, was stationed there. Mother filed suit in Texas, however, because Father was legally "domiciled" in Texas for the six months preceding suit and was a "resident" of Dallas County. In her petition, Mother did not request the trial court to enter orders regarding custody or support of their children. Instead, she alleged the children were under the jurisdiction of a German court. Father answered and filed a counterpetition. His petition included a suit affecting parent child relationship (SAPCR) requesting the Texas court to make orders for the conservatorship and support of the children. He alleged the children were not under the continuing jurisdiction of any court.
Mother filed a motion to dismiss the SAPCR asserting the Texas court did not have jurisdiction over custody issues under the Uniform Child Custody Jurisdiction Enforcement Act (UCCJEA) because Texas was not the "home state" of the children and because there was a "pending custody matter" before a German court. The trial court conducted a hearing on the motion to dismiss. At the hearing, Mother established a German court had entered orders regarding the children, but only with respect to Mother's right to establish the *585 children's residence. After the hearing, the trial court denied the motion.
Mother and Father subsequently entered into a settlement agreement regarding custody, visitation, child support, and division of property. The parties agreed they would cooperate to have the decree registered in Germany with the intent that it be enforced as permitted by law. Pursuant to the settlement, the trial court entered an agreed final decree.
In this appeal, Mother asserts that under the UCCJEA, the trial court did not have jurisdiction to include in its decree provisions regarding child custody because Texas is not the "home state" of the children. We will begin by noting that although Mother agreed to the trial court's jurisdiction, it is well settled that subject-matter jurisdiction cannot be conferred by consent, waiver, or estoppel. Dubai Petroleum Co. v. Kazi, 12 S.W.3d 71, 76 (Tex.2000); Kshatrya v. Tex. Workforce Comm'n, 97 S.W.3d 825, 829 (Tex.App.-Dallas 2003, no pet.); In re Barnes, 127 S.W.3d 843, 848 (Tex.App.-San Antonio 2003, no pet.); see also Baw v.Baw, 949 S.W.2d 764, 766 (Tex.App.-Dallas 1997, no pet.) (agreed judgment waives all error except jurisdictional error). Thus, Mother can contest the trial court's subject matter jurisdiction in this case.
Father nevertheless asserts Mother waived her complaint regarding the UCCJEA because it is not a subject matter jurisdiction statute, but rather a venue statute. Father acknowledges that the UCCJEA itself "references subject-matter jurisdiction." Moreover, Texas courts have consistently and routinely treated the UCCJEA as a subject matter jurisdiction statute, not a venue statute. See, e.g., Powell v. Stover, 165 S.W.3d 322, 324 (Tex. 2005); In re B.A.B., 124 S.W.3d 417, 419 (Tex.App.-Dallas 2004, no pet.). Until the Texas Supreme Court instructs us otherwise, we will continue to do so.
We now turn to whether the trial court had subject matter jurisdiction over the child custody determination. Whether a trial court has subject-matter jurisdiction is a question of law that this Court reviews de novo. B.A.B., 124 S.W.3d at 419. The party seeking to invoke the trial court's jurisdiction has the burden to allege facts that affirmatively demonstrate a court's authority to hear a case. Dillard Tex. Operating Ltd. P'ship v. City of Mesquite, 168 S.W.3d 211, 214 (Tex.App.-Dallas 2005, pet. filed). We construe the pleadings in favor of the party invoking jurisdiction. Id. We must also consider relevant evidence when necessary to resolve the jurisdictional issue. Id.
Section 152.201(a) of the UCCJEA is the exclusive jurisdictional basis for making a child custody determination by a court of this state. See TEX. FAM.CODE ANN. § 152.201(b) (Vernon 2002). Under section 152.201(a), a Texas court has jurisdiction to make an initial custody determination only if (1) this is the home state of the child on the date of the commencement of the proceeding, (2) a court of another state does not have "home state" jurisdiction or the court having "home state" jurisdiction has declined to exercise jurisdiction on the ground that Texas is the more appropriate forum and the child or his parents have a significant connection with the state, or (3) all courts otherwise having jurisdiction have declined jurisdiction on the ground that Texas is the more appropriate forum. See TEX. FAM.CODE ANN. § 152.201(a) (Vernon 2002). "Home state" means the state in which a child lived with a parent or person acting as a parent for at least six consecutive months before commencement of a child custody proceeding. TEX. FAM. CODE ANN. § 152.102(7) (Vernon 2002). In determining the child's "home state," we *586 focus on the child's "physical presence" in a state, not the legal residency of his parents. See generally Powell, 165 S.W.3d at 325-328. For purposes of the UCCJEA, a foreign country is to be treated as if it were a state of the United States. TEX. FAM.CODE ANN. § 152.105 (Vernon 2002).
In this case, Father's counterpetition for divorce is the petition that sought to bring the children within the trial court's subject matter jurisdiction. The only facts pleaded in support of jurisdiction were that Father was a "domiciliary" of Texas and a "resident" of Dallas County. Thus, Father's pleadings on their face would not establish jurisdiction under the UCCJEA. Moreover, Father did not comply with section 152.209 of the family code requiring him to file an affidavit in the trial court informing the trial court of the children's address, where they lived for the five years preceding suit, and any court proceedings involving the children. See TEX. FAM.CODE ANN. § 152.209 (Vernon 2002). Mother, however, did file an affidavit establishing the children have never lived in Texas and have been in Germany since 1997. Thus, the only evidence before the trial court establishes Germany, not Texas, was the "home state" of the children.
The only other basis from which the trial court could acquire jurisdiction is if the German court declined jurisdiction on the ground that Texas is a more appropriate forum. See TEX. FAM.CODE ANN. § 152.201(a) (Vernon 2002). However, there are no pleadings or proof in this record to support such a conclusion. We therefore conclude that under the plain terms of the UCCJEA, the Texas court lacked subject matter jurisdiction over child custody issues.
In reaching this conclusion, we reject Father's argument that section 6.406(b) of the family code conferred jurisdiction over the trial court. Section 6.406(b) requires a party to a divorce to include in its suit for divorce a suit affecting the parent child relationship unless the children of the marriage are under the continuing jurisdiction of another court. See TEX. FAM.CODE ANN. § 6.406(b) (Vernon 1998). According to Father, this statute vested the trial court with subject matter jurisdiction irrespective of whether jurisdiction existed under the UCCJEA. However, the UCCJEA specifically provides that it is the "exclusive jurisdictional basis" for making a child custody determination. TEX. FAM.CODE ANN. § 152.201(b) (Vernon 2002). We cannot ignore this express statutory language. Moreover, the UCCJEA provides that if its provisions conflict with another statute of this State, the UCCJEA controls. TEX. FAM.CODE ANN. § 152.002 (Vernon 2002).
Furthermore, section 6.308 establishes that the legislature specifically contemplated that a court might have jurisdiction over a divorce, but not a child custody determination. Specifically, section 6.308 provides (1) that a court in a suit for dissolution of a marriage may exercise its jurisdiction over those portions of the suit for which it has authority and (2) the trial court's authority to resolve the issues between the parties may be restricted because the trial court lacks jurisdiction under the UCCJEA. See TEX. FAM.CODE ANN. § 6.308 (Vernon 1998); see also Boots v. Lopez, 6 S.W.3d 292, 294 (Tex.App.-Houston [14th Dist.] 1999, pet. denied) (noting trial court had jurisdiction over divorce, but not child custody). Thus, we cannot agree the divorce proceeding vested the trial court with jurisdiction when jurisdiction was otherwise lacking under the UCCJEA.
We now turn to the proper disposition of this case. The judgment in this case was rendered on a mediated settlement agreement entered into after the *587 trial court incorrectly concluded it had jurisdiction over the child custody determination. We have now held a portion of the agreed judgment is void because the trial court did not in fact have jurisdiction over child custody issues. According to Father, if this Court concludes the trial court lacked jurisdiction over the child custody determination and thus the provisions of the mediated settlement agreement pertaining to child custody are not enforceable, the provisions of the mediated settlement agreement pertaining to property division also should not be enforced.
Our disposition of this appeal renders this case similar to cases in which a portion of the consideration for an agreement is void for illegality. In such cases, the entire agreement is void if the contract is "entire and indivisible." See In re Kasschau, 11 S.W.3d 305, 313 (Tex.App.-Houston [14th Dist.] 1999, no writ); Montgomery v. Browder, 930 S.W.2d 772, 778 (Tex. App.-Amarillo 1996, writ denied). However, if the original consideration for the contract is legal, but incidental promises within the contract are found to be illegal, the court may sever the invalid provision and uphold the valid portion, provided the invalid provision does not constitute the main or essential purpose of the agreement. Rogers v. Wolfson, 763 S.W.2d 922, 925 (Tex.App.-Dallas 1989, writ denied).
In this case, the effect the trial court's lack of jurisdiction over child custody has on the underlying settlement agreement is an issue that has not been presented to the trial court. We will not consider this issue for the first time on appeal. However, we recognize Father was not able to raise these issues in the trial court because of the trial court's error in determining its own jurisdiction. Under the unique circumstances presented here, we reverse those provisions of the decree involving the division of property and child support and remand those issues to the trial court for further development in light of our disposition of the jurisdictional issue. See TEX. R.APP. P. 43.3(b) (appellate court will render judgment the trial court should have rendered unless interest of justice require remand); City of Dayton v. Gates, 126 S.W.3d 288, 294 (Tex.App.-Beaumont 2004, no pet.) (remanding certain claims in interests of justice where trial court lacked jurisdiction over other claims). We dismiss Father's claims as to child custody for want of jurisdiction.
