mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-06-29 23:37:04 +00:00
17 lines
357 B
TypeScript
17 lines
357 B
TypeScript
import Stripe from "stripe";
|
|
|
|
export default function stripeSDK() {
|
|
const secretKey = process.env.STRIPE_SECRET_KEY;
|
|
|
|
if (!secretKey) {
|
|
throw new Error("Stripe secret key is not defined");
|
|
}
|
|
|
|
const stripe = new Stripe(secretKey, {
|
|
// @ts-ignore
|
|
apiVersion: process.env.STRIPE_API_VERSION || "2025-07-30.basil",
|
|
});
|
|
|
|
return stripe;
|
|
}
|