How to sell licenses for a Unity game or asset
Add product-scoped license validation to a Unity build, then publish that same product in a branded Store that takes payment and delivers the key automatically.
https://github.com/permitCore-spec/permitcore-sdk-unity.git#v2.1.1
using PermitCore;
using UnityEngine;
var client = new PermitCoreClient("https://api.permitcore.dev");
var result = await client.ValidateAsync(
licenseKey,
Application.version,
productId);
if (!result.IsValid)
ShowLicenseScreen(result.Message);From product record to paid customer
Use PermitCore for the licensing layer and Store checkout. Verified paid evidence triggers the configured license issuance and queues the delivery email; test actual delivery before launch.
- 01Create
Create the product and license policy
In Products, create the software your key unlocks. Choose its activation limit, validity, offline grace period, version range, and feature flags.
- Create one product per game or paid asset
- Set device limits and optional offline grace
- Copy the product ID from the Admin panel
- Create a test key before building the release
- 02Implement
Install the Unity SDK and scope the key
Put license activation in the first-run flow and validation at startup. Pass your product ID so a valid key for another product cannot unlock this one.
These are application fragments: supply your own key/product variables and UI or host flow. A validation call does not register a device or reserve a floating session. Check failure before protected work. Offline use needs explicitly configured trusted public keys; follow the SDK 2.1.1 offline setup. For C++, use the vcpkg registry and pinned baseline in its installation reference, rather than assuming a built-in public port.
https://github.com/permitCore-spec/permitcore-sdk-unity.git#v2.1.1- Keep the product ID with the build configuration
- Activate once on the customer device
- Validate on later launches
- Map feature flags to editions or DLC
- 03Verify
Test the real validation path
Use the generated test key to validate the happy path, then revoke it and confirm the game blocks access. Desktop, mobile, and console builds can also verify signed offline tokens locally; WebGL uses the online validation path.
- 04Sell
Publish the product in your Store
Connect your chosen Stripe, Paddle or Lemon Squeezy account, add the product to your branded PermitCore Store, and publish. Account credentials, matching catalog prices and signed webhook configuration are required. PermitCore processes the verified payment and handles Store license fulfillment.
- Add screenshots and a clear product description
- Price the game or asset in your Store
- Connect your chosen Store payment provider
- Test checkout and automatic key delivery
Verified payment triggers license issuance and the delivery email queue.
Unity production checklist
The sample is intentionally small. Add these safeguards before making licensing part of a paid release.
- Do not place privileged Admin API credentials in the Unity client.
- Test revoked, expired, wrong-product, and activation-limit responses.
- Use Unity's device identifier where its lifecycle matches your target platform.
- Choose online grace or signed offline activation deliberately for each build target.