mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 10:33:01 +00:00
stripe client setup
This commit is contained in:
14
packages/backend/src/stripe/client.ts
Normal file
14
packages/backend/src/stripe/client.ts
Normal file
@@ -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!;
|
||||
Reference in New Issue
Block a user