All integration tutorials
C++Create → implement → sell

How to add offline license validation to a C++ app

Install the SDK from PermitCore's vcpkg registry, verify a signed activation token without a server call, and sell the native build through a checkout connected to licensing.

0% PermitCore commission Your Stripe account Automatic license delivery
C++17
vcpkg custom registry
vcpkg install permitcore-sdk
#include <permitcore/permit_client.hpp>

permitcore::PermitClient client(
    "https://api.permitcore.dev"
);

auto activated = client.activate_offline(
    token, public_key_base64, device_id
);
if (!activated.is_valid)
    throw std::runtime_error(activated.message);

auto result = client.validate_offline(device_id);
One connected workflow

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.

  1. 01
    Create

    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 the native application product
    • Choose device and expiry limits
    • Issue a test offline token
    • Download the tenant public key
  2. 02
    Implement

    Install the C++ 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.

    vcpkg install permitcore-sdk
    • Configure PermitCore's vcpkg registry
    • Link permitcore::permitcore
    • Bind the token on first run
    • Re-verify the persisted token at startup
    Read the complete C++ SDK reference
  3. 03
    Verify

    Test the real validation path

    Issue a test offline token, verify and bind it on the target device, then test a tampered token, an expired token, and a different device ID. Local verification uses ECDSA P-256 and does not call the API.

  4. 04
    Sell

    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.

    • Publish the correct architecture and version
    • Add the build to your Store
    • Connect your own Stripe account
    • Document offline activation for buyers
    Follow the Store setup guide
    PermitCore branded Store showing software products ready to buy
    One checkout completes the sale and delivers the license.
Before you ship

C++ production checklist

The sample is intentionally small. Add these safeguards before making licensing part of a paid release.

  • Pin the custom-registry baseline from the SDK documentation for repeatable builds.
  • Ship the public key only; never embed a private signing or Admin credential.
  • Keep validation failure paths deterministic and independent of exception text.
  • Plan license transfer for hardware replacements before enforcing device binding.
The complete commercial path

Stop at a working sale, not a working API call.

Create the license policy, ship the C++ integration, and give buyers a Store where they can purchase it.