From 3ab89f5a76b9b117a47a05b9219eddccde2d367d Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 18 Jul 2026 23:25:23 -0700 Subject: [PATCH] fix(payments): align the stripe apiVersion literals with the vendored SDK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stripe 22.3.0 pins API version 2026-06-24.dahlia, but the two hardcoded fallbacks still said 2026-03-25.dahlia, failing tsc --build (TS2322 in payments/src/drivers/stripe.ts and orm/src/traits/billable.ts) and with it the typecheck job on main. Per the code comment, the literal and the SDK move together — the SDK was already bumped, this completes it. --- storage/framework/core/orm/src/traits/billable.ts | 2 +- storage/framework/core/payments/src/drivers/stripe.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/framework/core/orm/src/traits/billable.ts b/storage/framework/core/orm/src/traits/billable.ts index 0d263ad7e2..1ae5f16ea9 100644 --- a/storage/framework/core/orm/src/traits/billable.ts +++ b/storage/framework/core/orm/src/traits/billable.ts @@ -328,5 +328,5 @@ async function getStripe(): Promise { const secret = (globalThis as { process?: { env?: { STRIPE_SECRET_KEY?: string } } }).process?.env?.STRIPE_SECRET_KEY if (!secret) throw new Error('Stripe Connect: STRIPE_SECRET_KEY not configured') const StripeCtor = (await import('stripe')).default - return new StripeCtor(secret, { apiVersion: '2026-03-25.dahlia' }) + return new StripeCtor(secret, { apiVersion: '2026-06-24.dahlia' }) } diff --git a/storage/framework/core/payments/src/drivers/stripe.ts b/storage/framework/core/payments/src/drivers/stripe.ts index b30e243be1..8d26e8e757 100644 --- a/storage/framework/core/payments/src/drivers/stripe.ts +++ b/storage/framework/core/payments/src/drivers/stripe.ts @@ -39,7 +39,7 @@ export const stripe: Stripe = new Proxy({} as Stripe, { // pantry-vendored Stripe SDK types are compiled against — bumping // it here without bumping the SDK would mean responses include // fields the SDK doesn't know about. Update both at once. - const apiVersion: Stripe.LatestApiVersion = '2026-03-25.dahlia' + const apiVersion: Stripe.LatestApiVersion = '2026-06-24.dahlia' const configuredVersion = services?.stripe?.apiVersion if (configuredVersion && configuredVersion !== apiVersion) throw new Error(`Stripe API version ${configuredVersion} does not match the installed SDK version ${apiVersion}`)