text: import stripePackage from "stripe";
  import handler from "../http";
  import { calculateCost } from "../utils";
  
  export const main = handler(async (event, context) => {
    const { storage, source } = JSON.parse(event.body);
    const amount = calculateCost(storage);
    const description = "Scratch charge";
    const stripe = stripePackage(process.env.stripeSecretKey);
  
    await stripe.charges.create({
      source,
      amount,
      description,
      currency: "usd"
    });
    return { status: true };
  });