Describe the bug
After upgrading to [email protected], all params types under namespaced resources (e.g., Stripe.Checkout.SessionCreateParams) are no longer accessible, causing TypeScript compilation errors.
error TS2694: Namespace 'Checkout' has no exported member 'SessionCreateParams'.
To reproduce
import Stripe from 'stripe';
const stripe = new Stripe('sk_test_...');
// TS2694: Namespace 'Checkout' has no exported member 'SessionCreateParams'
const opts: Stripe.Checkout.SessionCreateParams = {
mode: 'subscription',
payment_method_types: ['card'],
};
Expected behavior
Stripe.Checkout.SessionCreateParams (and all other params types) should be accessible, as they were in v21.x.
Root cause
The generated esm/resources/Checkout/index.d.ts only re-exports Session in the Checkout namespace:
export declare namespace Checkout {
export { Session };
}
But Sessions.d.ts defines SessionCreateParams, SessionRetrieveParams, SessionUpdateParams, SessionListParams, SessionExpireParams, and SessionListLineItemsParams under export declare namespace Checkout { ... } — none of which are re-exported from the index.
Since stripe.core.d.ts imports Checkout from ./resources/Checkout/index.js, these types are invisible from the top-level Stripe namespace.
Scope
This affects all namespaced resources, not just Checkout:
BillingPortal (e.g., ConfigurationCreateParams, SessionCreateParams)
Billing, Issuing, Terminal, Treasury, Identity, Radar, Tax, FinancialConnections, Forwarding, Climate, Entitlements, Sigma, Reporting, Reserve, Apps, TestHelpers
Environment
- stripe-node version: 22.0.0
- Node.js version: 24.14.1
- TypeScript version: 6.0.2
Describe the bug
After upgrading to
[email protected], all params types under namespaced resources (e.g.,Stripe.Checkout.SessionCreateParams) are no longer accessible, causing TypeScript compilation errors.To reproduce
Expected behavior
Stripe.Checkout.SessionCreateParams(and all other params types) should be accessible, as they were in v21.x.Root cause
The generated
esm/resources/Checkout/index.d.tsonly re-exportsSessionin theCheckoutnamespace:But
Sessions.d.tsdefinesSessionCreateParams,SessionRetrieveParams,SessionUpdateParams,SessionListParams,SessionExpireParams, andSessionListLineItemsParamsunderexport declare namespace Checkout { ... }— none of which are re-exported from the index.Since
stripe.core.d.tsimportsCheckoutfrom./resources/Checkout/index.js, these types are invisible from the top-levelStripenamespace.Scope
This affects all namespaced resources, not just
Checkout:BillingPortal(e.g.,ConfigurationCreateParams,SessionCreateParams)Billing,Issuing,Terminal,Treasury,Identity,Radar,Tax,FinancialConnections,Forwarding,Climate,Entitlements,Sigma,Reporting,Reserve,Apps,TestHelpersEnvironment