- Symptom
- Stripe requests hang until timeout when MSW is activeRequests reach the real Stripe API instead of the mock under nock 14
- Cause
- The default Node HTTP client defers ending the request in a way that @mswjs/interceptors, which MSW and nock 14 use, did not see. 23.0.0 fixed the client.
- Fix
- Upgrade to stripe-node 23, or switch the client to the fetch based HTTP client in tests.
- Apply
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { httpClient: Stripe.createFetchHttpClient() });- Affected
- stripe-node before 23.0.0 with msw or nock 14; fixed in 23.0.0, 2026-09-30
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders