Skip to content

50+ open-source generative AI apps you can clone, deploy, and monetize — image generators, video tools, virtual try-ons, AI SaaS templates, and platform integrations. One-click Vercel deploy on every template.

Restore: src/lib/stripe.js

Anil Chandra Naidu Matcha6d89e0660e82
diff --git a/src/lib/stripe.js b/src/lib/stripe.js
new file mode 100644
index 0000000..f8a3542
--- /dev/null
+++ b/src/lib/stripe.js
@@ -0,0 +1,10 @@
+import Stripe from "stripe";
+import config from "./config";
+
+const apiKey = config.stripe.secretKey && config.stripe.secretKey.trim() !== ""
+ ? config.stripe.secretKey
+ : "sk_test_placeholder_key_for_build_purposes";
+
+export const stripe = new Stripe(apiKey, {
+ apiVersion: "2023-10-16",
+});