Skip to content

[Bug] v22: Params types missing from namespaced resource exports (Checkout.SessionCreateParams, etc.) #2662

@ubinatus

Description

@ubinatus

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions