@bu-payment/node-sdk
For Node.js 20 and later. Signs each request with the versioned HMAC protocol and redacts its secret from strings, JSON, inspection and errors. ESM and CommonJS builds with TypeScript types.
Developers
Two SDKs with no runtime dependencies. The server one signs every request and hides its own secret. The browser one only ever holds a publishable key.
import { parseClientConfig } from "@bu-payment/node-sdk"; const config = parseClientConfig({ applicationId: process.env.BUPAYMENT_APP_ID!, keyId: process.env.BUPAYMENT_KEY_ID!, secret: process.env.BUPAYMENT_SECRET!, apiBaseUrl: process.env.BUPAYMENT_API_BASE_URL!, }); // The environment comes from keyId: // a test key can never be pointed at live.
import { createBuPaymentClient } from "@bu-payment/browser-sdk"; const buPayment = createBuPaymentClient({ publishableKey: "bup_pk_test_...", apiBaseUrl: "https://api.example.com", }); const checkout = buPayment.checkout .priceId("price_pro_monthly") .email("buyer@example.com") .quantity(1) .start();
Quick start
An App groups the credentials, allowed origins and payments of one product you sell.
A confidential credential for your server, and a publishable key for the browser.
Point the browser SDK at a price from your catalogue and await the result.
Add a webhook endpoint and react when a payment succeeds or an invoice is paid.
Apps and credentials
Each App holds its own Test and Live credentials. Choose the capabilities a credential carries, restrict the origins that may use it, and rotate or revoke it when someone leaves.


Webhooks and logs
Open a request to read its body and response. Point webhook endpoints at your server, pick the events they receive, and switch them off without deleting them.
SDKs
For Node.js 20 and later. Signs each request with the versioned HMAC protocol and redacts its secret from strings, JSON, inspection and errors. ESM and CommonJS builds with TypeScript types.
For any front end, with no framework required. Catalogue, checkout and card saving, with automatic idempotency, resumable operations and typed events.