npm stripe 22.0.1
v22.0.1

latest releases: 22.1.0-alpha.2, 22.1.0-beta.2
13 hours ago
  • #2669 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_...');
  • #2664 Fixed nested service param exports in the Stripe namespace
  • #2667 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.
  • #2663 Throw a more descriptive error when calling rawRequest with absolute urls
  • #2652 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.

Don't miss a new stripe release

NewReleases is sending notifications on new releases.