import Stripe from 'stripe';
if (!process.env.STRIPE_SECRET_KEY) {
throw new Error('STRIPE_SECRET_KEY environment variable is required');
}
// Initialize Stripe with secret key
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
apiVersion: '2025-10-29.clover',
});
// Webhook configuration
export const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET;
console.log('✅ Stripe client initialized');
export default stripe;