From d44290e659c15a218b35c768c83603c716eede9b Mon Sep 17 00:00:00 2001 From: ReneFromFactorialBiomechanics Date: Thu, 1 May 2025 15:52:43 -0400 Subject: [PATCH 1/2] fix(types): add trial_period_days to createCheckoutSession options Adds missing `trial_period_days` field to `CommonSessionCreateParams` in the client SDK. This resolves a false-positive TypeScript error when using the `createCheckoutSession` function with a trial period, even though the backend supports it as of commit e9ee79e (January 2024). This change improves developer experience by aligning the client-side types with the backend implementation and avoiding misleading IDE or build-time errors. --- firestore-stripe-web-sdk/src/session.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firestore-stripe-web-sdk/src/session.ts b/firestore-stripe-web-sdk/src/session.ts index decbc1d4..933a6144 100644 --- a/firestore-stripe-web-sdk/src/session.ts +++ b/firestore-stripe-web-sdk/src/session.ts @@ -102,6 +102,10 @@ export interface CommonSessionCreateParams { * to `true`. */ trial_from_plan?: boolean; + + /* Specifies the duration of the trial period in days. Overrides the default on the pricing plan.*/ + + trial_period_days?: number, } /** From 4479017399fe03f82b56b834af7cbe783b27a60e Mon Sep 17 00:00:00 2001 From: ReneFromFactorialBiomechanics Date: Mon, 19 May 2025 13:33:25 -0400 Subject: [PATCH 2/2] style: fix Prettier formatting Fixed a typo --- firestore-stripe-web-sdk/src/session.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore-stripe-web-sdk/src/session.ts b/firestore-stripe-web-sdk/src/session.ts index 933a6144..b2f4a205 100644 --- a/firestore-stripe-web-sdk/src/session.ts +++ b/firestore-stripe-web-sdk/src/session.ts @@ -105,7 +105,7 @@ export interface CommonSessionCreateParams { /* Specifies the duration of the trial period in days. Overrides the default on the pricing plan.*/ - trial_period_days?: number, + trial_period_days?: number; } /**