Concepts: apps, plans, licenses, devices and tokens

Updated 2 min read

Preliminary documentation: it describes the planned product and will change before the beta.

Apps

An app is each product you sell, identified by a short slug such as myapp. Each app has its own plans, its own key prefix and its own signing key, so a token for one app never works in another.

Plans

A plan is what the customer buys. Each plan has a code (lifetime, annual, pro5…) and a kind:

Kind What it is Expires
lifetime One-time payment Never
subscription Monthly, quarterly, semiannual, yearly or every two years At the end of the paid period plus a grace period
free A free license that registers the user’s email; doesn’t unlock paid features Never
trial Paid features for a few days, without a card, on one device On the exact end date

Plans can also be add-ons that extend a main license, or stackable tiers (for example, more accounts) that add up.

Licenses and keys

A license is what a customer owns after buying a plan. It comes with a readable key such as MYAPP-7Q2KD-H9XNM-4TRVA-C8PWZ-K: a prefix for the app, 20 random characters and a check digit that catches typos before your app goes online. The key holds no data and never changes, not even on renewal. The server stores only its hash to look it up.

Activating a license always takes the purchase email and the key together.

Devices

Each activation takes up a device (a seat). By default, a lifetime license allows 3 devices and a subscription 1; you can change it per plan or per license. Customers free up a device from your app or from the customer portal.

Your app identifies the device with dev: a SHA-256 hash of your app slug and the machine id, so the raw machine id never leaves the device and can’t be matched across apps.

Tokens

When a device is activated, the Worker returns a token signed with your app’s Ed25519 key. Your app ships with the public key and verifies the token offline. The token says which app, license, plan, units (qty) and features (feat) it unlocks, which device it belongs to and when it expires. It carries no email or other personal data.

Revoked licenses (refunds, disputes) are published in a signed revocation list your app downloads from time to time.