Skip to main content

What is the Node SDK?

The @billingos/node package runs on your server. Use it to:
  • Create session tokens — authenticate your users with BillingOS
  • Check entitlements — verify feature access in API routes
  • Track usage — record metered usage from your backend
  • Manage customers — create and update customer records
  • Manage subscriptions — create, cancel, and modify subscriptions

Installation

Initialize

Configuration

Auto-environment detection

The SDK automatically detects your environment from the key prefix: You can override this with the apiUrl option or the BILLINGOS_API_URL environment variable.

Quick examples

Create a session token

Check a feature entitlement

Track usage

Error handling