Monetization
Monetization
The contract side of Kaiten — the License a customer bought, the values it grants, the Instance it is attached to, and the usage observed against it.
The chain
Monetization in Kaiten is one chain of four records. A License is what a customer bought. A license entitlement — the grant — is the value that License gives for one entitlement in your catalog: the contract side. An Instance is where your product runs for a customer, under exactly one License. Entitlement usage is what that instance has consumed: the observed side. Enforcement, targeting, and the audit trail all read this chain, so a commercial change is a data change, never a deploy.
License — one version of a product, with a type (DEVELOPMENT, TRIAL, PAID, COMMUNITY), a slug used in every URL, and a lifecycle state: draft, published, or archived — withdrawn from sale, kept by the instances already on it. A product's versions form a License family: a new version is created by naming the family, never by repeating a name, and the family serves its default version, or else its newest published one. Kaiten Sushi Shop sells three families with six versions between them: starter (COMMUNITY), standard (DEVELOPMENT, two versions), and premium (PAID, three). License Types covers the type, the family, the lifecycle, and the default version.
License entitlement — the join between a License and an entitlement, carrying a typed value: { "type": "number", "value": 1000 }, { "type": "boolean", "value": true }, or { "type": "object", "value": { … } }. An entitlement appears at most once per License, and each version carries its own grants. The same monthly-orders entitlement is granted at 20 on Starter, 100 on Standard, and 1,000 on Premium — the definition is written once, only the granted number differs. Pricing Tiers builds a tier from these rows.
Instance — the point of convergence: it references its customer, its License, and its license period (startLicenseDate, endLicenseDate). Everything an instance is entitled to is read through this reference — changing the License an instance runs under changes every grant it sees at once.
Entitlement usage — one record per NUMBER entitlement per instance: the running total, the number of reports that produced it, and the current period when the entitlement resets. Each report is compared with the grant of the instance's License at that moment; Usage & Metering covers what happens at the cap.
How it works
- Define entitlements — the typed rights in your catalog, shared by every tier:
POST /entitlements. - Create Licenses — one family per tier you sell:
POST /licenseswith atypeopens a family, and the same call with afamilySlugadds each later version to it. - Grant values — attach each entitlement to each License with the value that tier gives:
POST /licenses/{slug}/entitlements. - Attach instances — every instance is created under one License version:
POST /instanceswith thelicenseIdof the version its family serves, read fromGET /license-families/{familySlug}. - Let the model work — usage reports are enforced against the grant, feature flags read it through the
__kaitenfacts, and every change and evaluation lands in the audit trail.
Measurement lives on the entitlement; the amount and its enforcement live on the grant. Reset period, aggregation method, and warning threshold are properties of how monthly-orders is measured — identical on every License. How many orders a License grants, and how strictly (limitCapExceededOveragePercent), is the grant's business. That split is why one catalog serves every tier.
What arrives next
Coming soonLicenses and grants are the model in production today. The commercial layer on top of them — prices, add-ons, vouchers — is on the roadmap and has no API surface yet: What's coming describes it, the editions matrix shows where each capability lands, and the vocabulary names the terms in advance.
In this section
License Types
DEVELOPMENT, TRIAL, PAID, COMMUNITY — what the type is for, how versions form a License family, their lifecycle, and what a family's default version marks.
Pricing Tiers
Build a tier: one catalog of entitlements, one License per tier, one grant per pair — on the Kaiten Sushi Shop cast.
API endpoints overview
Scopes follow the module: read:licenses / write:licenses for Licenses and their grants; reading an instance's usage needs read:instances, reporting it write:instances. See scopes.
Licenses
| Method | Endpoint | Description |
|---|---|---|
GET | /licenses | List Licenses — every version (cursor-paginated) |
POST | /licenses | Create a License — a new family, or the next version of one (familySlug); the server assigns the version |
GET | /licenses/{slug} | Get one version, whatever its state |
PUT | /licenses/{slug} | Replace a version's details; its slug, version, family, and state are accepted as stored |
DELETE | /licenses/{slug} | Delete a version no instance runs under and that grants nothing; the last version takes its family with it |
POST | /licenses/{slug}/publish | Put a draft on sale |
POST | /licenses/{slug}/archive | Withdraw a published version from sale; instances on it keep it |
POST | /licenses/{slug}/unarchive | Put an archived version back on sale |
License families
| Method | Endpoint | Description |
|---|---|---|
GET | /license-families | List families, each with the version it serves (cursor-paginated) |
GET | /license-families/{familySlug} | The version a family serves, as currentVersion; ?version=N for one version, ?include=versions for all |
A family has no write endpoint: its first version opens it, and deleting its last version deletes it.
License entitlements — the grants
| Method | Endpoint | Description |
|---|---|---|
GET | /licenses/{slug}/entitlements | List the entitlements a License grants, with their values (cursor-paginated) |
POST | /licenses/{slug}/entitlements | Grant an entitlement on a License with a typed value |
GET | /licenses/{slug}/entitlements/{entitlementSlug} | Get one grant |
PUT | /licenses/{slug}/entitlements/{entitlementSlug} | Replace the granted value |
DELETE | /licenses/{slug}/entitlements/{entitlementSlug} | Remove the grant |
The contract, read from an instance
| Method | Endpoint | Description |
|---|---|---|
GET | /instances/{slug}/entitlements/usage | Every entitlement's usage and granted limit for the instance |
GET | /instances/{slug}/entitlements/{entitlementSlug}/usage | One entitlement's usage against its grant |
POST | /instances/{slug}/entitlements/{entitlementSlug}/usage | Report usage; enforced against the grant |
Events
| Event name | Event type |
|---|---|
LICENSE_CREATED | com.kaiten.license.v1.created |
LICENSE_UPDATED | com.kaiten.license.v1.updated |
LICENSE_PUBLISHED | com.kaiten.license.v1.published |
LICENSE_ARCHIVED | com.kaiten.license.v1.archived |
LICENSE_UNARCHIVED | com.kaiten.license.v1.unarchived |
LICENSE_DELETED | com.kaiten.license.v1.deleted |
LICENSE_FAMILY_CREATED | com.kaiten.license_family.v1.created |
LICENSE_FAMILY_UPDATED | com.kaiten.license_family.v1.updated |
LICENSE_FAMILY_DELETED | com.kaiten.license_family.v1.deleted |
LICENSE_ENTITLEMENT_ASSIGNED | com.kaiten.license.entitlement.v1.assigned |
LICENSE_ENTITLEMENT_UPDATED | com.kaiten.license.entitlement.v1.updated |
LICENSE_ENTITLEMENT_UNASSIGNED | com.kaiten.license.entitlement.v1.unassigned |
The six License events carry the License, the three License family events the family with the version it serves; a family event is recorded by the version write that caused it. The event catalog lists every event with its payload; events and webhooks explains the two delivery paths.
Where to go next
The one-screen version of this chain is the concept page Licenses & Entitlements; the observed side is Usage & Metering. Exact reference — tables, columns, constraints: the contract section of the data model.
Deployments & Lifecycle
The append-only deployment journal — how a deployment is recorded, how the instance linkage resolves what runs where, how history is read, and the lifecycle states the model carries.
License Types
The four License types, the fields a License carries, how versions form a License family and move through their lifecycle, and what a family's default version marks — verified against the API.