diff --git a/packages/backend/src/stripe/client.ts b/packages/backend/src/stripe/client.ts new file mode 100644 index 0000000..8fab7e0 --- /dev/null +++ b/packages/backend/src/stripe/client.ts @@ -0,0 +1,14 @@ +import Stripe from "stripe"; + +const stripeSecretKey = process.env.STRIPE_SECRET_KEY; + +if (!stripeSecretKey) { + throw new Error("STRIPE_SECRET_KEY is required"); +} + +export const stripe = new Stripe(stripeSecretKey, { + apiVersion: "2024-12-18.acacia", +}); + +export const STRIPE_PRICE_MONTHLY = process.env.STRIPE_PRICE_MONTHLY!; +export const STRIPE_PRICE_ANNUAL = process.env.STRIPE_PRICE_ANNUAL!;