SDK Integration
The reference License Guard (/sdk) does activate → cached fail-soft heartbeat → entitlement-gated
features, with graceful degradation. Available for PHP/WordPress and Node.
PHP / WordPress
$guard = new EktasiLicenseGuard([
'api_base' => 'https://api.ektasi.io',
'client_secret' => EKTASI_LICENSE_CLIENT_SECRET, // wp-config, never in JS
'product_id' => 'ektasi_plugin_001',
'domain' => parse_url(home_url(), PHP_URL_HOST),
]);
$guard->activate($_POST['purchase_code']);
$guard->guard('premium', fn($ent) => run_premium($ent), fn($st) => show_locked_banner($st));
Node
const { EktasiLicenseGuard, FileStore } = require('./ektasi-license-guard');
const guard = new EktasiLicenseGuard({ apiBase: 'https://api.ektasi.io', clientSecret: process.env.EKTASI_LICENSE_CLIENT_SECRET, productId: 'ektasi_plugin_001', domain: 'my-shop.com', store: new FileStore('/var/lib/app/license.json') });
await guard.activate(code);
await guard.guard('premium', (ent) => callServerFeature(ent));
Rules: keep the client secret server-side, obfuscate the bootstrapper, gate on the entitlement (not a local boolean), fail soft, and disclose activation requirements in your marketplace listing.