## TL;DR

Issue stripe/stripe-node#2683 (closed, 20 comments): ### Describe the bug stripe@22.0.1 appears to fix the CommonJS constructor regression from #2660. [jar-stripe (maintainer)]: Fixed in v22.3.0; reporter confirmed the minimal repro compiles.

## Steps

1. Issue stripe/stripe-node#2683 (closed, 20 comments): ### Describe the bug

2. `stripe@22.0.1` appears to fix the CommonJS constructor regression from #2660.

3. However, there seems to be a separate TypeScript issue specifically with type-only default imports:

```ts
import type Stripe from 'stripe';

let customer: Stripe.Customer; // TS2694: Namespace 'StripeConstructor' has no exported member 'Customer'
```

4. In contrast, the standard documented usage continues to work.
```ts
import Stripe from 'stripe';

5. const stripe = new Stripe('your_stripe_secret_key', {
 apiVersion: '2026-03-25.dahlia',
});

6. async function createCustomer() {
 return await stri

7. [jar-stripe (maintainer)]: Fixed in v22.3.0; reporter confirmed the minimal repro compiles. Root cause: the CJS type declarations dropped nested namespaces (e.g. `Stripe.Price.Recurring`) while the ESM entrypoint kept them. Before the fix, maintainer workaround (xavdid-stripe): switch tsconfig moduleResolution to bundler/nodenext or migrate the package to ESM so the ESM entrypoint types resolve.

## When to use

You are seeing this: Root cause: the CJS type declarations dropped nested namespaces (e.g. Use this skill when you run into "v22.0.1: `import type Stripe from 'stripe'` does not expose `Stripe.Customer`".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

Versions mentioned in the source: stripe 22.0.1, v22.3.0. If you are on something much newer or older, the details may have shifted.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
