Skip to main content
This walkthrough goes from a fresh install to a paying, metered customer. Every request and response below was run against a clean instance; where the API’s behavior might surprise you, that’s called out rather than smoothed over. Assumes the quickstart stack and its seeded credentials. $TOKEN is a JWT from login; $KEY is the seeded API key.

1. Create a feature

2. Create a plan — it starts as a DRAFT

Plans are created in DRAFT status regardless of what you pass at creation, and draft plans reject subscriptions. Activation is a deliberate, separate step (step 4).
type is always BASE; the behavior lives in value.pricing. For usage pricing, price_per_unit and usage_unit_type are both required — the API returns a specific error naming the missing field if you omit either.

4. Activate the plan

5. Create a customer — keyed by your ID

customerReferenceId is your system’s ID for this customer. You never need Tanso’s internal UUID on the client API.

6. Subscribe

The client subscribe endpoint takes customerReferenceId — not customerId. The subscription is created inactive, and a DUE invoice for the base price is generated. Access begins when that invoice is paid.

7. Pay the invoice

Without Stripe connected, invoices are settled explicitly:
This activates the subscription and grants its entitlements. (With Stripe connected, payment flows through Stripe checkout/webhooks instead, and mark-paid is rejected.)

8. Check the entitlement — now allowed

Before payment this same call returned allowed: false. Enforcement is real-time: the check reflects subscription state at the moment you ask.

9. Report usage — revenue is attributed immediately

The event books 12 × $0.10 = $1.20 of revenue at ingestion — margin analytics don’t wait for invoice time. Replaying the same eventIdempotencyKey returns 409 Conflict; generate a unique key per event. At cycle close, the scheduler rolls the period’s usage into the next invoice automatically.