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#v1.1.0
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 the sale. Your customer checks out in your branded Store and receives a working license automatically.
- 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.
https://github.com/permitCore-spec/permitcore-sdk-unity.git#v1.1.0- 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 Stripe account, add the product to your branded PermitCore Store, and publish. Checkout creates the license and delivers it to the customer without a webhook project or a second commerce platform.
- Add screenshots and a clear product description
- Price the game or asset in your Store
- Connect your own Stripe account
- Test checkout and automatic key delivery
One checkout completes the sale and delivers the license.
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.