Documentation
PrimeLock Docs
Everything you need to protect and license your software.
Overview
PrimeLock is a software licensing platform. When a customer buys your plugin or app, PrimeLock issues them a signed license key. They activate it on their machine using the PrimeLock License Manager app. Your plugin verifies the signature locally at startup — no internet required after the first activation.
RSA-2048 Signing
Each product gets its own keypair. Private key never leaves PrimeLock.
Auto Delivery
License keys emailed instantly on purchase via Selar or Flutterwave.
Machine Activation
Customers activate on N machines. Deactivate and move seats any time.
Quickstart
Get up and running in 5 minutes:
Create your account
Register at portal.primelock.theprimis.org/register
Register a product
Dashboard → + Add Product. PrimeLock generates an RSA keypair automatically.
Copy your Product ID
Found on the product page. Embed this in your plugin alongside the public key.
Connect your store
Add a Selar or Flutterwave webhook — PrimeLock auto-issues keys on every sale.
Embed the SDK
Drop the C++ SDK into your JUCE project. It verifies the signed token at startup.
Registering Products
Each piece of software you sell is a Product in PrimeLock. When you create a product, PrimeLock generates a dedicated RSA-2048 keypair. The public key is embedded in your plugin. The private key never leaves PrimeLock's servers.
Fields
Name — Display name (e.g. "Cue Engine") Slug — URL-safe identifier (e.g. "cue-engine") Product Type — plugin | desktop | web | game Max Seats — How many machines one license can activate (default: 2) Version — Current version string (e.g. "1.0.0")
Issuing Licenses
You can issue licenses manually from the dashboard or automatically via webhook.
Manual (Dashboard)
Dashboard → click your product → + Issue License → enter customer email → Issue. The key is emailed instantly.
Automatic (API)
POST https://api.primelock.theprimis.org/licenses
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"product_id": "uuid-of-your-product",
"customer_email": "buyer@example.com",
"customer_name": "John Doe",
"license_type": "perpetual"
}Your API Key
Your API key is shown on your dashboard. It looks like PL-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Use it in webhook URLs so PrimeLock knows which developer's products to issue licenses for.
Selar Webhook
In your Selar product settings, set the webhook URL to:
https://api.primelock.theprimis.org/webhooks/selar?api_key=YOUR_API_KEY&product=YOUR_PRODUCT_SLUG
Replace YOUR_API_KEY with your PrimeLock API key and YOUR_PRODUCT_SLUG with your product slug (e.g. cue-engine).
⚡ What happens
When a sale is confirmed, Selar pings PrimeLock → a license key is generated → emailed to the buyer automatically. No manual work needed.
Flutterwave Webhook
In your Flutterwave dashboard → Settings → Webhooks, set the URL to:
https://api.primelock.theprimis.org/webhooks/flutterwave?api_key=YOUR_API_KEY&product=YOUR_PRODUCT_SLUG
Also copy the Webhook Hash from Flutterwave and add it to your Render environment as FLW_WEBHOOK_HASH.
C++ / JUCE SDK Setup
Add the PrimeLock SDK to your JUCE project in 3 steps:
1. Copy the SDK files
primelock/
sdk/
PrimeLockLicense.h
PrimeLockLicense.cppCopy these two files into your plugin's source directory and add them to your JUCE project.
2. Get your public key and Product ID
From your product page in the portal, copy the RSA public key and the Product ID (UUID). These are safe to embed in your binary.
3. Verify at startup
#include "PrimeLockLicense.h"
// In your plugin constructor or prepareToPlay:
const char* PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\n"
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A...\n"
"-----END PUBLIC KEY-----";
const char* PRODUCT_ID = "your-product-uuid-here";
PrimeLockLicense license(PUBLIC_KEY, PRODUCT_ID);
PrimeLockLicense::Status status = license.verify();
if (status != PrimeLockLicense::Status::Valid) {
// Show license prompt or disable processing
showLicenseDialog();
}Verifying Tokens
The SDK verifies the license token entirely offline using RSA signature verification. No network call is made during verification. The token is loaded from the system keychain where the License Manager stores it.
License is active on this machine.
No token found — show activation screen.
Subscription has lapsed.
Signature check failed — tampered token.
License Manager — Download
The PrimeLock License Manager is a native desktop app for Mac and Windows. Your customers use it to activate and manage their licenses.
Customer Flow
Here's what your customers experience:
Buy your plugin → receive a license key email from PrimeLock
Download and open the PrimeLock License Manager
Sign in with their purchase email — receive a 6-digit code
Enter the code → see all their licenses automatically
Click "+ Activate Here" on any license → plugin is activated
Plugin verifies the signed token locally at every startup
API — Activate
POST/licenses/activate
Called by the License Manager app when a customer activates on a new machine. No authentication required.
{
"license_key": "PL-XXXX-XXXX-XXXX-XXXX",
"product_id": "uuid-of-product",
"machine_fingerprint": "sha256-of-machine-id",
"machine_label": "MacBook Pro (M1)",
"os": "darwin",
"os_version": "14.0"
}Returns a signed JWT token on success. Store this in the system keychain.
API — Validate
POST/licenses/validate
Periodic background check. Call this once on startup if online. If offline, the plugin should trust the stored token.
{
"license_key": "PL-XXXX-XXXX-XXXX-XXXX",
"product_id": "uuid-of-product",
"machine_fingerprint": "sha256-of-machine-id"
}API — Deactivate
POST/licenses/deactivate
Frees up a seat so the customer can activate on a different machine.
{
"license_key": "PL-XXXX-XXXX-XXXX-XXXX",
"product_id": "uuid-of-product",
"machine_fingerprint": "sha256-of-machine-id"
}Questions? Email support@theprimis.org