All integration tutorials
PHPCreate → implement → sell

How to license and sell PHP software

Validate downloadable PHP software against the correct product, apply feature flags to editions, and let your Store turn a successful Stripe payment into a delivered license.

0% PermitCore commission Your Stripe account Automatic license delivery
PHP 8+
Composer
composer require permitcore/sdk
<?php
require 'vendor/autoload.php';

use PermitCore\PermitCoreClient;

$client = new PermitCoreClient(
    'https://api.permitcore.dev'
);
$result = $client->validate(
    $licenseKey,
    expectedProductId: $productId
);

if (!$result->isValid) exit($result->message);
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 plugin or downloadable product
    • Choose activations and validity
    • Define paid feature flags
    • Copy the product ID
  2. 02
    Implement

    Install the PHP 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.

    composer require permitcore/sdk
    • Install the official Composer package
    • Activate per installation when needed
    • Validate before protected operations
    • Scope the key to this product
    Read the complete PHP SDK reference
  3. 03
    Verify

    Test the real validation path

    Create a test key for the PHP product and call the same code from a clean installation. Then try a key from another product and confirm expectedProductId returns WrongProduct instead of granting access.

  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.

    • Create a Store listing and pricing
    • Connect the vendor Stripe account
    • Publish the checkout
    • Let payment create and deliver the key
    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

PHP production checklist

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

  • Perform checks server-side and keep the stored customer key out of public logs.
  • Cache only according to your revocation and offline-grace requirements.
  • Use feature flags for editions instead of distributing multiple validation secrets.
  • Test shared-hosting environments with cURL, JSON, and OpenSSL extensions enabled.
The complete commercial path

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

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