Checkitout is still in early development, API are prone to change. Please report any issues you find.

Installation

Installation

npm install @justmiracle/checkitout

Create an instance

lib/checkitout.ts
import { Checkitout } from "@justmiracle/checkitout";
 
export const checkitout = new Checkitout({
  token: "token_af********8z"
});

Usage

checkout-action.ts
import { checkitout } from "@/lib/checkitout";
 
// Create a checkout
const checkout = await checkitout.create({ ... });
 
// Get checkout URL
const url = checkiout.getCheckoutUrl(checkout.data.id);
 
// Find one checkout by ID
const foundCheckout = await checkitout.findOne(checkout.data.id);

On this page