This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user