Packages

stripe

23.2.0 · 19 Nov 2026MIT36.1M / weekRepositorynpmAtom feed

Your version

22.0.1

8 Apr 2026Where it was published

22.6.2 is the newest release of 22.x.

In short

3 new1 fixed1 changed

Release note

  • Add constructor based initialization for CJS based TypeScript imports

    • Initialization of Stripe class with new keyword is now possible for CJS based TypeScript project. Resolves: 2660

    import Stripe = require('stripe');
    // ✅ Both statements work
    const stripeNew: Stripe.Stripe = new Stripe('sk_test_...');
    const stripeCalled: Stripe.Stripe = Stripe('sk_test_...');
  • Fixed nested service param exports in the Stripe namespace

  • Add type safety to Stripe constructor config (no runtime change)

    • Fixed some compile-time checks (no runtime changes)

      • Fixed Stripe constructor config parameter to use StripeConfig type instead of Record<string, unknown>, restoring compile-time type safety.

      • Added missing authenticator property to StripeConfig.

      • Fixed Stripe.API_VERSION to retain the literal API version type.

      • Fixed StripeConfig.stripeContext to accept StripeContext objects in addition to strings.

  • Throw a more descriptive error when calling rawRequest with absolute urls

  • Added string to WebhookHeader type for compatibility with express

    • Added string to the type of signature param in stripe.webhooks.construct_event method.

See the changelog for more details.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.