The official SDK is published as
@tansohq/sdk. It works
against a self-hosted instance with one option: baseUrl.
Without baseUrl, the SDK routes by key prefix to Tanso’s hosted endpoints.
For a self-hosted instance, always set it.
The integration loop
Surface
| Resource | Methods |
|---|
customers | create, get, update |
subscriptions | create, cancel, revertCancellation, changePlan, cancelScheduledChange |
entitlements | check, evaluate, list |
events | ingest |
plans | list |
features | list, get |
credits | listPools, getPool, listGrants, listTransactions |
billing | listInvoices, markPaid, createCheckoutSession |
Errors are typed
TansoConflictError on a duplicate idempotency key is the SDK working as
designed: your retries are safe because the second write is refused.
Notes
- List responses return
{ items, pagination }; plan list items nest the
plan under a plan property.
subscriptions.create takes customerReferenceId, and the target plan
must be ACTIVE (see billing lifecycle).