import Stripe from 'stripe' if (!process.env.STRIPE_SECRET_KEY) { throw new Error('STRIPE_SECRET_KEY is not defined in environment variables') } // Initialize Stripe on the server side ONLY // This file should NEVER be imported in client-side code export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { apiVersion: '2025-09-30.clover', typescript: true, })