Libs — Ship Fast ⚡️

The boilerplate to interact with external APIs is already set up. Import the functions you need from the /libs folder.

For instance, if you need to create a Stripe Checkout:

/pages/dashboard.js

import { createCheckout } from "@/libs/stripe";
  import config from "@/config";

  const { url } = await createCheckout({
    user: session.user,
    clientReferenceID: session.user.id,
    successUrl: window.location.href,
    cancelUrl: window.location.href,
    priceId: config.stripe.plans[0].priceId,
    couponId: null,
  });