Update Server Contract
When update_server is set in plugin.json, Nazmart periodically polls your server for new versions.
Version Check Request
# Nazmart sends:
GET {update_server}/info?plugin_id={id}&version={current}&domain={domain}&license_key={key}
Expected Response
{
"latest_version": "1.2.0",
"download_url": "https://updates.acme.com/downloads/acme-seo-1.2.0.zip",
"changelog": "# 1.2.0\n- Added XML sitemap support\n- Fixed robots.txt generation",
"released_at": "2026-04-30",
"min_platform_version": "2.5.0"
}
If latest_version is greater than the currently installed version, Nazmart admin shows an update badge on the plugin card. Admins can trigger a one-click update which downloads the ZIP from download_url and runs on_update($from_version).
ℹ️ The download_url should return a valid ZIP file directly. For paid plugins, validate the license_key parameter before serving the download.
License Validation Contract
Plugins with "pricing": "paid" require a valid license key. Admins enter the key in the plugin settings UI.
Activation Request
# Nazmart sends on key entry:
POST {update_server}/license/activate
Content-Type: application/json
{
"plugin_id": "acme-seo",
"license_key": "XXXX-XXXX-XXXX-XXXX",
"domain": "shop.example.com"
}
Expected Response
{
"status": "active", // active | expired | invalid
"expires_at": null, // ISO 8601 date string, or null for lifetime
"message": "License activated successfully"
}
Status Values
| Status | Effect |
|---|---|
active | is_licensed() returns true. Plugin runs fully. |
expired | is_licensed() returns false. Admin sees renewal prompt. |
invalid | is_licensed() returns false. Admin sees invalid key error. |
⚠️ Degrade gracefully: Licenses are re-validated daily. Your plugin's boot() is always called, but is_licensed() will be false when the key is invalid. Check this and show a helpful "license required" notice rather than throwing errors.
public function boot(): void
{
if (!$this->is_licensed()) {
// Register a notice and exit gracefully
$this->add_action('nazmart:frontend_head_end', function () {
// show nothing, or a purchase prompt
});
return;
}
// Full feature set for licensed users
$this->registerFullFeatures();
}
CLI Reference
php artisan plugin:list— List all discovered plugins with their status (active/inactive), version, and type.php artisan plugin:create vendor-name— Scaffold a new plugin skeleton inplugins/vendor-name/with boilerplate class and manifest.php artisan plugin:install /path/to.zip— Install a plugin from a ZIP archive. Validates the manifest and callson_activate().php artisan cache:clear— Clear the plugin manifest cache after editingplugin.json. Cache is 60s in production.tail -f storage/logs/plugin.log— Watch plugin boot and hook errors in real time.

