CAIRO INFOTEC DIGITAL STORE • Premium Digital Products. Secure Licensing. Reliable Updates.
CAIRO DIGITAL STORE Powered by CAIRO INFOTEC
Developer & Customer Resources

Platform Documentation

Complete reference for the WordPress License Client SDK and License REST API.

1. Customer Quickstart

After completing a purchase on Cairo Plugin Store, you will receive a unique license key formatted as:

CAIR-ABCD-1234-EFGH-5678
  1. Download the plugin ZIP file from your Downloads page.
  2. Upload the ZIP file in WordPress via Plugins → Add New Plugin → Upload Plugin.
  3. Activate the plugin, navigate to Settings → [Plugin Name] License, and paste your license key.
  4. Click Activate License. Once verified, all premium features and automatic updates will unlock immediately.

2. WordPress License Client SDK

The official reusable SDK is located in packages/cairo-wordpress-sdk/CairoLicenseClient.php. It gives any WordPress plugin automatic licensing, domain validation, update hooks, and non-intrusive expiration banners.

<?php
require_once __DIR__ . '/CairoLicenseClient.php';

$cairoLicense = new CairoLicenseClient([
    'api_url'        => 'https://plugins.yourdomain.com/api/v1',
    'plugin_file'    => __FILE__,
    'plugin_slug'    => 'my-custom-plugin',
    'plugin_version' => '1.0.0',
    'plugin_name'    => 'My Custom Plugin',
]);

// Check if license is currently valid:
if ($cairoLicense->isLicenseValid()) {
    // Unlocked premium functionality
}

3. Strict Expiration Policy

Notice: Cairo Plugin Store enforces a strict license expiration policy. When a license expires, premium features and update requests are rejected by the API.
  • No Site Crashes: The WordPress website continues functioning with free/fallback logic intact.
  • Protected Customer Data: No tables or user-generated data are deleted.
  • Offline Verification Grace: Up to 72 hours of temporary network blips are permitted before false expiration triggers.
  • Instant Renewal: As soon as the customer renews, the license returns to active status immediately.

4. License REST API Endpoints

All licensing endpoints are located under /api/v1/ and return cryptographically-signed JSON responses with an HMAC-SHA256 signature.

POST /api/v1/license/activate

Activates a license key for a given domain and increments current activation counts.

Payload: {"license_key": "CAIR-XXXX-...", "domain": "example.com", "wp_version": "6.7"}
POST /api/v1/license/validate

Validates license validity, checks expiration timestamps, and updates domain heartbeat.

POST /api/v1/license/deactivate

Deactivates a domain, freeing up an activation slot for the license.

POST /api/v1/plugin/check-update

Returns update metadata compatible with the WordPress update transient.