This is a work in progress page.
The TypeScript library provides convenient access to the Pandabase API from applications written in server-side TypeScript/JavaScript.
Installation
Install the package with:
npm
npm install @pandabase/nodepnpm
pnpm add @pandabase/nodebun
bun add @pandabase/nodeUsage
The package needs to be configured with your api key, which is available in the api keys tab.
import { Pandabase } from "@pandabase/node";const pandabase = new Pandabase({ storeId: "shp_", apiKey: "sk_...",});await pandabase.checkouts.create({ items: [ { name: "Product A", quantity: 1, amount: 1000, // $10.00 USD }, ], // https://docs.pandabase.io/api-reference/checkouts/create-checkout-session#body-items customer: { email: "joe@gmail.com", },});await store.checkouts.estimate({}); // same API as above just returns a preview