Zum Inhalt springen

Die Entwickler-Doku gibt es nur auf Englisch.

Concepts

The objects and rules you work with as a vendor. The normative details are in the protocol.

Pre-release. Some objects below (plans, licenses, resets) are specified but not yet exposed in the Management API. Pages marked "planned" describe the intended behavior.

Overview

Team (you)
 └─ Product
     ├─ Entitlement   "pro", "export", "seats" ...
     ├─ Plan          term, device limit, entitlements, offline tolerance
     └─ License       created from a plan, shown to the customer as a license key
         └─ Activation   this license on one device
             └─ Session  a running use of the activation (heartbeat)
Term Meaning
Team Your organization on Noctix, with members and roles (owner, admin, support, reseller)
Product One piece of software you license. Has a public product ID (prod_...) and its own signing keys
Entitlement One feature or tier a license can unlock. Has a code such as pro. Value is a flag (true), a limit (a number) or a variant (a string)
Plan A template for licenses of a product: term, device limit, entitlements, reset rules, offline tolerance
License A concrete right to use the product, created from a plan. Identified by its license key; its ID (lic_...) is different and appears in tokens
Customer Your end customer. Customers belong to you; Noctix keeps no accounts across vendors
Activation The binding of a license to one device or installation
Session A running use of an activation, kept alive by heartbeats
License token A short-lived, signed proof the server issues. The SDK checks it locally

IDs have a prefix and 26 characters (prod_, lic_, act_, key_). They are random, never sequential.

License keys

A license key is random: 25 characters plus a check character, with no data hidden inside. You can set prefix, grouping and character set per product. A key identifies a license on the server, nothing more. The token carries the license ID, never the key.

License states

A license has exactly one state.

State Meaning Reversible
Unused Created, not redeemed yet Yes
Active Usable Yes
Expired Term ended (a grace period can apply) Yes: extend it
Paused Term on hold Yes: resume it
Suspended Blocked by you, with a reason Yes: unsuspend
Revoked Ended for good, for example after a refund No

Only a revocation is final. A chargeback suspends first; a confirmed refund revokes.

Activations and devices

activate binds a license to a device. The plan's device limit is how many activations can exist at once. At the limit, activate fails with device_limit_reached.

The device is recognized by a binding, chosen in this order: a key in the security chip (planned), digests of a few hardware features, a random installation ID. The server sees digests only, never the measured values. Replacing one part of a PC does not lock the user out; changing two or more counts as another device. The exact list of features is in device identification.

A reset frees an activation so the customer can activate on a new device. Who may reset, and how often, is a rule of the plan (planned).

Tokens

After every successful activate and validate the server returns a license token: a signed PASETO v4.public token that names the license, the device binding, the entitlements and three times.

Time Meaning
exp The token should be renewed by now. Default: 24 hours after issue
oexp The last moment the token may be used while the server cannot be reached
lexp End of the license term, for display
gexp End of the grace period after the term, if the plan has one (grace_days). Only in tokens of licenses with a term

The SDK checks the token at every start without a network call. The result is fresh (before exp), grace (between exp and oexp; usable, the SDK tries to renew) or expired.

Separate from that state, a license whose term has ended but whose plan grants a grace period stays usable until gexp. Every SDK reports this end once lexp has passed (for example license_grace_until in Python and Rust), so your app can say "Your license expired. It keeps working until …". Within the term the value is empty.

There is no algorithm choice and no shared secret. Anyone can verify a token with the public key; only Noctix's signing service can create one. Your app and backend hold public keys only.

Offline tolerance

Offline tolerance is how long an app keeps running with its last token while it cannot reach the server: on a plane, behind a firewall, or during an outage.

  • Default: 7 days. Per plan: 0 to 30 days.
  • With 0, oexp equals exp: the app must renew every day.
  • Both times are capped at the end of the license term.
  • A signed refusal ends the license on that device at once, whatever the offline end says. Offline tolerance only covers "no usable answer".
  • The SDK never accepts a system time more than 5 minutes before the latest server time it has seen. Setting the clock back does not extend offline use.

Choose by risk: long for field tools and creative software, short for high-value or subscription software that is always online anyway.

Test and live

Every product has two separate environments. They have their own signing keys, licenses, activations, API keys and settings. Data never crosses.

  • Management API keys start with mk_test_ or mk_live_ and see one environment only.
  • A token carries its environment. A test token fails in a live build (token_mismatch).
  • Build your integration against test. Repeat the setup in live before release.

Key rotation

Each token names the key that signed it. A product can accept two public keys at once. To rotate: add the new public key to your app's list next to the old one, release the app, then switch the server to the new key. Old apps keep working until the old key is retired, so no forced update is needed. The Node and Rust SDKs take a list of keys.

Events and audit log

Every change of state produces an event with actor, subject and time: who suspended a license, which key was revoked. The audit log, webhooks and reports read the same events. Events are append-only. How long they are kept depends on your plan.

Management API and Client API

Management API Client API
Called by Your servers and the dashboard Apps on devices, through the SDK
Authenticated by API key (mk_...), a secret Nothing. Product ID is public
Used for Products, plans, licenses, keys activate, validate, heartbeat, deactivate
Answers JSON Signed tokens

No function of the Management API is reachable from a client. Never put an mk_ key into an app.