Appellants, defendants below, bring this appeal from the ex parte dismissal of appellee’s cause of action sua sponte by the trial court. The principal ground of the appeal is that appellants were denied a hearing by the trial court at the time the complaint was dismissed.
This unusual situation in which a defendant complains of the dismissal of a lawsuit brought against them arose in the following manner. Appellants are *172engaged in the rock quarrying business. Appellee alleged that appellants encroached upon her family’s land during their granite quarrying operations, with resulting trespass and damages. Appellee brought suit in Elbert County against appellants in October, 1973, seeking damages. Appellants moved for summary judgment alleging a defense of the statute of limitation, among others. Appellants appealed the denial of their motion for summary judgment, and this court affirmed the denial by the trial court in June, 1975. McLanahan v. Keith, 135 Ga. App. 117 (217 SE2d 420). On September 23,1975, appellee voluntarily dismissed her Elbert County suit. She refiled the suit in Fulton County on that same day. It is undisputed that appellee did not pay all the costs of the dismissed Elbert County suit as required by Ga. L. 1966, pp. 609, 653 (Code Ann. § 81A-141 (d)). On March 19, 1976, three days before the expiration of the six months available for refiling under Code § 3-808, appellee filed with the trial court in Fulton County a solemn admission in judicio admitting the failure to pay the costs of the dismissed suit and suggesting to the trial court that pursuant to the authority of Ga. L. 1966, pp. 609, 622; 1967, pp. 226, 231; 1968, pp. 1104, 1106; 1972, pp. 689, 692, 693 (Code Ann. § 81A-112 (h) (3)) the court should dismiss her suit filed in Fulton County on September 23,1975, on the ground that it failed to meet the jurisdictional requisite of prepayment of costs of the earlier dismissed suit in Elbert County. Though copies of these documents were served by mail on appellants, the documents were not received until the day next after mailing and after the trial court had dismissed the case for lack of jurisdiction. On that same day, having paid the costs of the Elbert County suit, appellee refiled the suit (for the third time) in the same Fulton County court.
Appellants complain that they were denied due process by the failure of the trial court to grant them a hearing on the ex parte dismissal of the September, 1975, case by the trial court. They allege prejudice in that, while appellee attempted to invoke a sua sponte dismissal by the trial court pursuant to Code Ann. § 81A-112 (h) (3), supra, in reality, appellants assert this amounted to a second voluntary dismissal and thus became a dismissal *173with prejudice as an adjudication upon the merits (Ga. L. 1966, pp. 609, 653 (Code Ann. § 81A-141(a)). Appellants also argue that the trial court erred in refusing to set aside its order of March 19, 1976, dismissing the September, 1975, case rather than amending that order on April 9, 1976, nunc pro tunc to reflect that the September, 1975, case was stricken from the court’s docket and dismissed without prejudice. Prejudice allegedly flows from the fact that if the March 19, 1976, order had been set aside, the dismissal of the September, 1975, case would have occurred on April 9, 1976, over six months after the voluntary dismissal of the Elbert County filing, thereby not preserving the suit on its same footing as to the statute of limitation (Code Ann. § 3-808). Held:
1. Appellee has moved this court to dismiss the appeal, alleging that either there is no case below from which an appeal may be taken, it having been stricken from the court’s docket as being without jurisdiction and thus void ab initio; or alternatively, since the case was refiled in the same court on the same day, the case is still pending below, and required the grant of an interlocutory appeal by this court, a requisite not met.
We reject both of these arguments. Appellants have brought this appeal from the dismissal of case No. C-9551. Case No. C-15446, presently pending in the Superior Court of Fulton County, is between these same parties and involves the same matter; nevertheless, it is a different lawsuit. Before it could be filed, costs had to be paid in C-9551. Moreover, it long has been the law of this state that dismissal of a suit because of lack of jurisdiction constitutes a final termination of that case for purposes of appeal. Knight v. Ga. Southwestern &c. R. Co., 18 Ga. App. 539 (90 SE 81); Ray v. Hicks, 146 Ga. 685 (92 SE 48). The motion to dismiss the appeal is denied.
2. We have considered the arguments of appellants that they were prejudiced by the denial of a hearing on the dismissal action by the trial court, and find them to be without merit. Appellants first advance the argument that the lawsuit numbered C-9551 involved a common law action of conversion which clearly is within the subject matter jurisdiction of the Superior Court of Fulton County. However, the question is not whether the court *174had jurisdiction over the subject matter or the person, but whether the court had power to proceed at all. A plaintiff may voluntarily dismiss and refile his suit on repayment of costs of the first suit. Code § 3 -808; CPA § 41 (d) (Code Ann. § 81A-141 (d), supra). But the payment of the costs is a condition precedent to the right to renew the original action. Brinson v. Kramer, 72 Ga. App. 63 (33 SE2d 41); Grier v. Wade Ford, Inc., 135 Ga. App. 821 (219 SE2d 43). In O’Kelley v. Alexander, 225 Ga. 32, 33 (165 SE2d 648), in construing the phrase "dismissals for lack of jurisdiction,” our Supreme Court stated: "This phrase should not be construed so as to limit its application to only those cases in which fundamental jurisdictional defects appear which would render a judgment void and subject to collateral attack, such as cases wherein it appears the court lacked jurisdiction over the person of the defendant or jurisdiction of the subject matter of the action. We think that this phrase is broad enough to encompass those dismissals which are based on the failure of the plaintiff to comply with a precondition requisite to the trial court’s going forward with a determination of the merits of the plaintiffs substantive claim, and we so construe it.” Considering the judicial admission made by appellee, we conclude that the trial court had no jurisdiction to proceed with case No. C-9551.
It is clear that appellee did not make a motion to dismiss case No. C-9551. She simply confessed facts that established a lack of jurisdiction to proceed with her case. It is true she suggested that the court might dismiss the case. But that is exactly what CPA § 12 (h) (3) (Code Ann. § 81A-112 (h) (3) supra) authorizes. That section provides: "(3) Whenever it appears by suggestion of the parties or otherwise that the court lacks jurisdiction of the subject-matter, the court shall dismiss the action.” (Emphasis supplied.) In this case the trial court did no more than what the law authorized it to do for the statute in question clearly authorizes a sua sponte dismissal by the trial court.
3. Equally ephemeral is that prong of appellants’ argument that urges that they should have been granted the right to be heard on the dismissal action of the court. We have already observed that the court had no *175jurisdiction to proceed with case C-9551, since costs had not been paid on the previously dismissed cause of action. CPA 12 (3), supra, grants the court the power to dismiss a case for lack of jurisdiction apparently with or without a hearing. Thus appellants were not entitled to a hearing as a matter of right.
Argued September 9, 1976 Decided October 4, 1976 Rehearing denied October 25, 1976 Grant, Smith & Shiver, Truett P. Smith, William F. Grant, for appellants. E. Phil Duderwicz, David W. Griffeth, for appellee.4. For the reasons stated in Divisions 2 and 3 of this opinion, the remaining enumeration of error made by appellant is without merit.
Judgment affirmed.
Webb and McMurray, JJ., concur.