From 262250564a72fe9e25d076af7624db0b8b1fe39f Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 24 May 2026 23:48:39 +0200 Subject: [PATCH] Phase4: Stripe --- src/lib/stripe.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/stripe.ts b/src/lib/stripe.ts index c2f27a5..30c001d 100644 --- a/src/lib/stripe.ts +++ b/src/lib/stripe.ts @@ -29,9 +29,13 @@ import Stripe from "stripe"; import type { Invoice } from "@/types"; -// Pinned API version. Bump deliberately, not via dependency update. -// Keep this matched to the stripe-node major version in package.json. -const STRIPE_API_VERSION = "2026-03-25.dahlia" as const; +// Pinned API version. This is a string-literal type in the Stripe +// SDK — the explicit `Stripe.LatestApiVersion` annotation forces a +// compile error when the installed SDK ships with a different pin, +// so a `npm update` that bumps Stripe to a new API version gets +// caught here rather than at runtime. Bump this string deliberately +// alongside the SDK upgrade and review the API changelog. +const STRIPE_API_VERSION: Stripe.LatestApiVersion = "2026-04-22.dahlia"; // Cache the client across hot reloads / serverless invocations. // We don't instantiate at module load because some build steps run