Clavem

Selling and licensing a macOS app with Stripe

To sell a Mac app with Stripe and license keys, distribute it yourself as a notarized download. The Mac App Store forbids its own license keys, so keys only belong in the direct build. Clavem issues the key after the Stripe payment and checks it from the app.

Two ways to sell, and why keys belong to one of them

A Mac app reaches buyers through the Mac App Store or through a download you host. The two channels have different rules about licensing.

Apple’s App Review Guidelines say that apps distributed through the Mac App Store “may not present a license screen at launch, require license keys, or implement their own copy protection” (2.4.5 vi). The same section says such apps must use the Mac App Store for updates (2.4.5 vii), and guideline 3.1.1 tells apps to use In-App Purchase to charge for features instead of “license keys”. So a Mac App Store build cannot be licensed by Clavem or by anyone else.

Selling direct is the other path, and it is where Stripe and license keys fit. Apple’s Small Business Program lowers its commission to 15% for developers below 1 million USD of yearly proceeds, so the store is not always the expensive option. If App Store search and one-click purchase matter more to you than control of the customer relationship, use the store and stop reading. If you want the buyer’s email, your own pricing and trials, upgrade prices, and a payout from Stripe, sell direct.

Some developers ship both: a Mac App Store build with In-App Purchase and a direct build with license keys. They are two products with two update channels. Keep them apart in your code, or a key entered in the wrong one will do nothing.

What is specific to a direct Mac build

Signing and notarization. Apple says Gatekeeper checks for a Developer ID certificate on apps distributed outside the Mac App Store, and notarization adds an automated security scan. Do both before you upload a release. A buyer who opens an unsigned download sees a warning before they ever see your license screen.

Sandbox. Direct builds do not have to be sandboxed. If you sandbox anyway, add the outgoing network entitlement, or every call to the License API fails with no useful error.

Storing the key. Put the key, the instance id and the token in the Keychain, not in UserDefaults. Someone who copies a preferences file should not get a working license.

Fingerprint. Hash the Mac’s hardware UUID and send the result as fingerprint when you activate. Activating again with a fingerprint that is already active returns the same seat, so reinstalling the app on the same Mac does not use a second device.

Offline. Mac users close the lid on trains and in planes. Verify the signed token from the last validation when there is no network, and ask for a connection only when refresh_by, 14 days after the token was issued, has passed. See offline verification.

Setting Suggested value Why
License type Perpetual for the current major version, or a subscription Mac buyers expect to pay once for utilities; subscriptions suit apps with a server cost
Device limit 2 or 3 A desktop and a laptop, plus one spare for a replacement Mac
Trial 14 days, kept in the app, or a trial license created from the management API An app-side trial needs no Clavem license until the buyer pays
Updates Check the releases endpoint at launch and open the download Gate downloads on a valid key, or use Sparkle and keep the key check in the app

A new Mac with the old Keychain

When a customer restores a backup or moves to a new Mac, the stored instance id and token can come along, while the hardware UUID changes. If your app compares the token’s fp with the current hardware and refuses on a mismatch, a legitimate move looks like piracy. A kinder rule: validate with the stored instance_id, and only if the server says 404 instance_id not found, clear the saved license and ask for the key again. Activating there uses a new seat, so tell the customer they can free the old one on the device page.

Doing this with Clavem

Create a product, connect your Stripe account with a restricted key, and map your Stripe product to it. Every paid checkout then creates a key, emails the buyer and publishes an order page with the download. The app makes three calls: activate once, validate at launch, deactivate when the customer moves. The Swift guide has the full flow with Keychain and CryptoKit, run against the live API.

For updates, upload each release as a file labelled macos, then check GET /v1/releases/:productId/latest with the key in the X-License-Key header. A valid, unexpired key gets a signed download URL that lasts an hour; see releases and downloads.

Clavem is not a merchant of record, so VAT and sales tax on Mac sales are yours to handle through Stripe. The Mac distribution article covers that choice.

Guides to follow

Questions

Can I use license keys in a Mac App Store app?

No. Apple's guidelines say Mac App Store apps may not present a license screen at launch, require license keys or implement their own copy protection. Use In-App Purchase there, and keep license keys for the build you sell yourself.

Do I need to notarize an app I sell outside the App Store?

Apple asks you to sign with a Developer ID certificate so Gatekeeper trusts the download, and to submit it for notarization, which scans it for malware. Without both, buyers meet warnings when they open the app.

Sources

  1. Apple App Review Guidelines, 2.4.5 and 3.1.1 (checked November 2026)
  2. Apple App Store Small Business Program (checked November 2026)
  3. Apple Developer ID and notarization (checked November 2026)