text: import stripePackage from 'stripe';
  import handler from './libs/handler-lib';
  import { calculateCost } from './libs/billing-lib';
  
  export const main = handler(async (event, context) => {
      const { storage, source } = JSON.parse(event.body);
      const amount = calculateCost(storage);
      const description = "Scratch charge";
  
      // Load our secret key from the environment variables
      const stripe = stripePackage(process.env.stripeSecretKey);
  
      await stripe.charges.create({
          source,
          amount,
          description,
          currency: "usd",
          // shipping only when testinf from india
          shipping: {
              name: "pawan sah",
              address: {
                  line1: "510 Townsend St",
                  postal_code: "98140",
                  city: "San Francisco",
                  state: "CA",
                  country: "US",
              },
          },
      });
  
      return { status: true };
  });