Clavem

Licensing a cross-platform desktop app with Stripe

Sell one product, issue one key, and let that key activate on macOS, Windows and Linux. The device limit counts machines across all systems, and per-platform labels on your release files send each system its own download.

One product, three systems

A license is a right to use a product. It does not know which operating system the buyer runs. In Clavem, a product holds the device limit, the validity and the signing key, and every key for that product behaves the same on any system that can make an HTTPS request. If a buyer has a MacBook for travel and a Windows desktop at home, both activate against one key and use two of its slots.

That is the part that stays the same. What changes between systems is how you identify the machine, where you store the key, how the update is delivered and what the install looks like. Each system has its own page: macOS, Windows and Linux. Frameworks that already span systems have theirs too: Electron and Tauri.

Pick the guide for your stack

You build with Licensing code lives in Start here
Swift and AppKit or SwiftUI The app, using Keychain Swift guide
Electron The main process Electron guide
Tauri Rust commands Tauri guide
Qt or C++ A shared C++ class Qt guide
C# and .NET The app C# guide
Flutter Dart, with platform storage Flutter guide
Go with Wails Go backend Wails guide
Java or Kotlin The JVM app Java guide

What to decide once, for every system

Device names. instance_name is for people: it is what the customer sees on the device page. Send the computer’s name plus the system, for example Ada's MacBook Pro (macOS), so a buyer can tell which seat to remove.

Fingerprints. Send a stable hash of something about the machine, or a random id kept in the app’s data folder, as fingerprint. Activating again with a fingerprint already active returns the same seat. A different method per system is fine, as long as each is stable on its own system.

Secret storage. Use the system’s own store: Keychain on macOS, Credential Manager or DPAPI on Windows, the secret service on Linux with a protected file as the fallback. The offline page explains what to keep: the key, the instance id and the latest token.

One launch-time flow. The recommended sequence is the same everywhere: validate at launch with a short timeout, store the new token, fall back to the stored token when there is no answer, and ask for a connection only after refresh_by. Write that once as a small module and call it from each platform shell.

Release files per system

Upload one file per platform to the same release and give each a platform label. Labels are free text of 1 to 40 characters from lowercase letters, digits, dots, dashes and underscores, so macos, windows and linux work. A file with no label is universal. The app asks for its own system:

curl "https://clavem.io/v1/releases/42/latest?platform=windows" \
  -H "X-License-Key: YOUR-LICENSE-KEY"

The response lists that platform’s files plus the universal ones, with a signed download link on each when the key is valid for the product. Two limits matter for desktop builds: each file can be up to 5 GiB, and each plan includes storage for all files you keep. If you ship three installers of 150 MB, even the free plan’s 1 GB holds the current version, but old releases add up, so delete builds you no longer offer. See releases and downloads.

Setting Suggested value Why
License type Perpetual, with paid major upgrades The usual desktop deal; a subscription suits apps with server costs
Device limit 3 Two daily machines and one replacement
Trial 14 days Long enough to finish one real task in the app
Updates Releases endpoint, one file per platform A buyer on any system gets the right file

When one key per system makes sense

Some products charge per system, for example a Windows edition and a Mac edition at different prices. Then make two Clavem products and map each Stripe price to its own product. A key for one will not work for the other, because each product signs with its own key and your app checks pid.

Guides to follow

Questions

Can one license key work on Mac and Windows?

Yes. A Clavem key belongs to a product, not to an operating system. Each machine that activates uses one device slot, whatever its system, and you decide how many slots a key has.

Do I need separate products for each operating system?

Not for licensing. One product with one key and one device limit covers all three. Upload each platform's installer to the same product with a platform label.