Skip to main content
The TypeScript library provides convenient access to the Pandabase API from applications written in server-side TypeScript/JavaScript.

Installation

Install the package with:
npm install @pandabase/node

Usage

The package needs to be configured with your api key, which is available in the api keys tab.
import { Client } from "@pandabase/node";

const pb = new Client({
  storeId: "store_",
  apiKey: "sk_v3_interactions_"
});

const payments = await pb.payments.list({
  page: 1, page_size: 10
})

const products = await pb.products.list({
  page: 1, page_size: 10
});

const { url } = await pb.payments.createLink({
  amount: 100, // in cents
  currency: 'USD'
})

console.log(url);
// logs `https://pay.pandabase.io/<payId>?token=`