import Stripe from "stripe"; // Initialize Stripe with your secret key from environment variables export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY || "", { apiVersion: "2024-11-20.acacia", typescript: true, }); // Helper function to format amount for Stripe (convert to cents) export function formatAmountForStripe( amount: number, currency: string = "usd" ): number { return Math.round(amount * 100); } // Helper function to format amount from Stripe (convert from cents) export function formatAmountFromStripe( amount: number, currency: string = "usd" ): number { return Math.round(amount) / 100; }