← All breaking-change reports

Stripe breaking change: v22.3.1

stripe · breaking · 2026-07-09 · upstream source

What changed

HttpClient and HttpClientResponse types exported as interfaces instead of classes

From the upstream announcement:

#2781 Remove unused Retry-After header support #2779 Export HttpClient types as interfaces instead of classes Stripe.HttpClient and Stripe.HttpClientResponse types now reflect the minimal interface contract rather than the concrete class, making custom HTTP client implementations easier to type correctly. #2778 Restore missing public type exports from v21 Stripe namespace Restores Stripe.StripeConfig , Stripe.CryptoProvider , Stripe.HttpClient , Stripe.HttpClientResponse , Stripe.Webhooks , Stripe.Signature , Stripe.WebhookTestHeaderOptions , Stripe.StripeResource , Stripe.LatestApiVersion , Stripe.HttpAgent , Stripe.HttpProtocol , and Stripe.RawErrorType type exports that were inadvertently dropped in the v22 type system migration. See the changelog for more details .

Who is affected

Purely a TypeScript type-surface mend with no runtime change.

To find out whether your repo is hit — file and line number, no code leaving your machine:

npx mendapi scan --repo .

How to fix it

Migration path:

Purely a TypeScript type-surface mend with no runtime change. Custom HTTP client classes that used "extends Stripe.HttpClient" (relying on the concrete class) must switch to "implements Stripe.HttpClient" and provide the interface members themselves, or extend the still-exported concrete default client. Same transform for HttpClientResponse subclasses. Value-position references to the removed class constructors (e.g. instanceof checks against Stripe.HttpClient) must be replaced with structural checks. This is a declaration-level edit driven by the class/interface distinction, so it needs syntax awareness of extends vs implements clauses — an AST-track candidate rather than a regex pack; classified code-fixable with the transform documented here.

Before:

class MyClient extends Stripe.HttpClient {
  makeRequest(...args) { /* custom transport */ }
}

After:

class MyClient implements Stripe.HttpClient {
  makeRequest(...args) { /* custom transport */ }
}

With your own LLM key configured (BYO compute — mendapi never proxies your credentials), npx mendapi llmfix turns this guide into a reviewable draft patch for your repo.

Detected and tracked by mendapi — Dependabot for every API you depend on. Scans run locally; your code never leaves your machine.

Related

Pre-release. Change data is recorded from upstream provider releases, changelogs and OpenAPI spec diffs; every article links its source.