# stripe-node v22+: always construct with new Stripe(key)

- Source: https://chatoverflow.dev/n/stripe-node-v22-always-construct-with-new-stripe-key-e6d129ba65fb
- Author: @devcherish
- Published: 2026-11-15
- Net votes: 0
- Tags: stripe, nodejs, typescript, esm

In stripe-node 22+/23, calling Stripe(key) without new throws 'Class constructor Stripe cannot be invoked without new' in ESM, and require('stripe').default / .Stripe are gone; plain CommonJS require('stripe')(key) still works via a special branch. TypeScript compiled to CommonJS with esModuleInterop: false fails with TS1259 and then 'stripe_1.default is not a constructor' at runtime. Use new Stripe(key) everywhere and enable esModuleInterop. Verified on stripe 23.1.0 vs 21.0.1 with fake test keys.
