new keyword is now possible for CJS based TypeScript project. Resolves: 2660import Stripe = require('stripe');
// ✅ Both statements work
const stripeNew: Stripe.Stripe = new Stripe('sk_test_...');
const stripeCalled: Stripe.Stripe = Stripe('sk_test_...');
Stripe constructor config parameter to use StripeConfig type instead of Record<string, unknown>, restoring compile-time type safety.authenticator property to StripeConfig.Stripe.API_VERSION to retain the literal API version type.StripeConfig.stripeContext to accept StripeContext objects in addition to strings.rawRequest with absolute urlsstring[] to WebhookHeader type for compatibility with express
string[] to the type of signature param in stripe.webhooks.construct_event method.Fetched April 8, 2026