Licensing a SaaS product
A B2B SaaS vendor selling tiered plans — seats, feature gates and a metered API quota — without building a licensing subsystem.
The setup: your backend holds the license; end users never see codes. Each customer has one entitlement, with seats for their users and meters for what they consume.
How the pieces map
Section titled “How the pieces map”| You need | You use |
|---|---|
| Basic / Pro / Enterprise tiers | One plan set with three plans; each customer’s entitlement applies one |
| Feature gates per tier | Features snapshotted into the license — checked in-process, no per-request API call |
| Seat limits | A numeric feature (users.max) enforced by your app, or per-user activation with seat allocation |
| API call quotas | A monitored asset with a monthly quota and tier thresholds |
| Upgrade/downgrade, renewal, churn | Entitlement operations + Entitlement.* webhooks into your CRM |
Integration sketch
Section titled “Integration sketch”- Your backend embeds the .NET SDK (or calls REST
directly). Each customer environment activates with
StaticNodeId.Create(customerId)— a stable logical fingerprint, so restarts and autoscaled instances share one seat instead of leaking new ones. - Feature checks are local: the license is a signed token your process validates in memory. A request handler asking “is SSO enabled for this customer?” costs nothing.
- Report API consumption in batches
(
UsageReporter.ReportAssetUsageAsync("api-calls.total", n)); the platform aggregates against the quota and firesMeteredUsage.OverageStatusChangedwhen a customer crosses Warning or hits their cap — your webhook receiver alerts sales to follow up. - Sales operations stay in the portal: new customer → new entitlement from an offer; upgrade → apply a different plan; churn → cancel, and the license stops validating at the next renewal.
Special cases are policies
Section titled “Special cases are policies”Plan changes mid-period, usage aggregation windows, grace on renewal failure, “we promised customer X an exception” — in Oclavex these are policies on an entitlement, changed per customer without a deploy.
See it live: sign up and try Mirage — an AI media studio running this use case with metered hourly quotas, prepaid credits and an in-app plan upgrade, on a license issued to you.
Start with the API quickstart — the full loop, from first token to reading usage back, is eight calls.