fetch, has no heavyweight dependencies, and works in Node.js 18+.
Install
Initialise
apiKey explicitly or set NOMBA_API_KEY as an environment variable — the SDK picks it up automatically if you don’t pass it.
Resources
Every API resource maps to a method on the client:client.customers
client.subscriptions
client.plans
client.invoices
Webhook handler
constructEvent verifies the Plinth-Signature header against your endpoint secret (whsec_…) and
returns the parsed event. Pass the raw body. For a framework-agnostic version and the exact
signing scheme, see Receiving webhooks.
constructEvent throws if the signature doesn’t match — return 401 in that case.
Error handling
The SDK throws typed errors for every failure case:NombaApiError covers all HTTP errors (4xx, 5xx). NombaSignatureError covers invalid webhook signatures.
Idempotency keys
Pass an idempotency key in options to safely retry:A Python SDK is in progress. In the meantime, the REST API works with any HTTP client — see the curl examples throughout the docs.