Stripe · sdk · fg-0154

stripe-node calls hang or bypass MSW and Nock 14 mocks in tests

Stripe requests hang until timeout when MSW is active

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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() });

Affects: stripe-node before 23.0.0 with msw or nock 14; fixed in 23.0.0, 2026-09-30

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp