import Stripe from 'stripe';
import { config } from './config.js';

export function getStripe() {
  if (!config.stripeSecretKey) {
    throw new Error('Missing STRIPE_SECRET_KEY');
  }

  return new Stripe(config.stripeSecretKey, {
    apiVersion: '2026-03-25.dahlia'
  });
}
