@gebarbilling/server
v0.4.1
Published
Backend GebarBilling billing SDK with a unified task-oriented client.
Readme
@gebarbilling/server
Backend-only privileged SDK for GEBARBILLING.
Install
pnpm add @gebarbilling/serverQuickstart
import { GebarBillingServer } from "@gebarbilling/server";
const billing = new GebarBillingServer({
apiKey: process.env.GEBARBILLING_SECRET_KEY,
baseUrl: process.env.GEBARBILLING_BASE_URL
});
await billing.checkout.createSession({ customerId: "cus_123", planId: "plan_growth" });API Summary
customers, plans, subscriptions, checkout, portal, invoices, billingState, currency, and rawRequest.
Common Pitfalls
Use this package only on servers, workers, admin systems, and trusted backend environments.
Security Defaults
- HTTPS is required for
baseUrlandcheckoutDomainunlessallowInsecureHttpis explicitly enabled for local development. - Redirect following is disabled by default in the built-in HTTP client. Set
allowRedirectsonly withallowedRedirectHostsand a boundedmaxRedirects. - API endpoint paths can be overridden with the
endpointsoption for private gateways or versioned backend deployments. Overrides must be relative paths, not absolute URLs. - Do not reuse a singleton server client across tenants with different credentials; create a client per tenant or per request scope.
