Node SDK
The Node SDK is generated from the OpenAPI contract, covers every operation, and
has zero runtime dependencies (uses global fetch, Node 18+).
Install
Section titled “Install”npm install @bizzle/sdk-nodeQuickstart
Section titled “Quickstart”import { BizzleClient } from "@bizzle/sdk-node";
const bizzle = new BizzleClient({ apiKey: process.env.BIZZLE_SECRET_KEY, // sk_test_… or sk_live_… // baseUrl: "https://api.bizzle.my/v1", // optional (default)});
const payment = await bizzle.createPayment({ body: { amount: 50000, currency: "TZS", description: "Order #1042" }, idempotencyKey: "order-1042",});
console.log(payment.id, payment.status, payment.checkout_url);Request options
Section titled “Request options”Every operation accepts:
{ query?, body?, idempotencyKey?, headers? }Operations with path parameters take them as the first argument, e.g.:
const payment = await bizzle.getPayment({ id: "pay_123" });Errors
Section titled “Errors”Failures throw BizzleApiError with .status and .body:
import { BizzleApiError } from "@bizzle/sdk-node";
try { await bizzle.createPayment({ body: { amount: 0, currency: "TZS" } });} catch (err) { if (err instanceof BizzleApiError) console.error(err.status, err.body);}