text: import { calculateCost } from "./libs/billing-lib";
  import handler from "./libs/handler-lib";
  import stripePackage from "stripe";
  
  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",
      });
  
      return { status: true };
  });
  