What this thread does
The problem
After upgrading to stripe-node v22, TypeScript projects using CommonJS module resolution lost the nested type names that earlier versions exposed, such as Stripe.CustomerUpdateParams.TaxExempt ("Namespace 'StripeConstructor' has no exported member"). Issue 2683 was opened on 2026-04-12 by seigo2016; it was closed on 2026-07-01.
What Stripe's maintainers said
1. Workaround (2026-04-13). A Stripe maintainer (xavdid) said a fix was in progress and that switching the project from CommonJS to ESM through tsconfig.json and package.json avoids it. Stripe was considering a pure-ESM SDK later. 2. ESM is not always possible. A commenter noted NestJS did not yet support ESM, so Stripe said it would test before deciding, and that Node 20 and later can require ESM packages. 3. Fix. A first fix pull request (#2725, "Fixes CJS type exports for stripe package") was merged on 2026-06-18, but it did not cover nested namespaces: a user still saw errors on v22.2.2 (for example Stripe.Price.Recurring). A commenter explained the cause: under CommonJS resolution the .cjs.node.d.ts types dropped nested namespaces while the ESM types kept them. Stripe's fix was announced on 2026-06-24, and the opener confirmed on 2026-06-29 that his minimal reproduction compiled on v22.3.0 and asked to close the issue.
What to do
1. Upgrade stripe to v22.3.0 or later and run tsc again before changing any module settings. 2. If you are stuck on an earlier v22 release, one user's report said moduleResolution: "bundler" (with module set to an ES value) removed the errors, while node and node16 failed. Another suggested NonNullable<Stripe.Price['recurring']> as a type-level workaround. Both come from commenters, not Stripe's documentation. 3. Moving to ESM is the maintainers' workaround but is not needed after the fix, and it may not fit your framework.
Limits
I confirmed from the GitHub issue and release page that v22.3.0 was published on 2026-06-24 and that its release notes credit PR 2765 ("fix: CJS companion namespace access for resource types at all depths", covering Stripe.Price.Recurring and Stripe.Subscription.BillingMode) rather than the earlier PR merged on 2026-06-18, but I did not install the package or run a TypeScript build, so I have not seen the errors disappear myself. One user reported different problems on v22.2.2 before the fix; nobody in the thread reported failures on v22.3.0.
Sources
- stripe/stripe-node issue 2683 was read through the GitHub API with all comments. Checked: opened 2026-04-12, closed 2026-07-01; the member workaround comment of 2026-04-13 (switch to ESM) and the Node 20 require-ESM remark; the NestJS reply; the 2026-06-19 report of Stripe.Price.Recurring errors on v22.2.2 and the 2026-06-23 explanation by seigo2016; the 2026-06-24 member note that the fix ships with the next release; the 2026-06-29 confirmation on v22.3.0.
- stripe-node release v22.3.0 notes were read through the API. Checked: published 2026-06-24 and crediting PR 2765 for CJS nested namespace access. Pull request 2725 was merged on 2026-06-18. As of November 2026 (checked 2026-11-24), stripe-node's newest stable tag is v23.2.0 (2026-11-19); I did not check whether the major bump changes anything here.
Not checked: I did not install the package or run a TypeScript build.
Started from a post by @seigo2016, packaged by the editor. Original post