Tiers, Bundles & Licensing
Packages separates reusable License Tiers (packages-tiers) from per-package pricing matrices (packages-items.tier_prices) and multi-package Bundles (packages-bundles).
Reusable Tiers & Per-Package Pricing
Section titled “Reusable Tiers & Per-Package Pricing”Define standard commercial structures once in packages-tiers (for example single, pro, agency):
- License Model:
one_time_updates,subscription,lifetime, ortrial. - Quotas: Maximum production sites (
max_sites), team seats (max_seats), andupdate_days(for example365). - Renewal Discount: Percentage discount applied when renewing a
one_time_updateslicense before expiry.
On each packages-items entry, map tier keys to concrete prices in tier_prices so different modules can share the same tier definitions at different price points.
Bundles & All-Access Passes (packages-bundles)
Section titled “Bundles & All-Access Passes (packages-bundles)”Create bundles in Setup -> Packages -> Bundles & Passes to sell multiple packages under one license:
- Explicit Package List (
package_ids): Grants access to a curated set of modules (for exampleAegean Complete Suitecontainingbooking-kitandcharter-sync). - All-Access Pass (
include_all_packages): Automatically grants access to every published package in the registry, including newly released modules.
Programmatic License Provisioning
Section titled “Programmatic License Provisioning”<?php namespace ProcessWire;
$packages = Packages::requireInstance($wire);
// Grant a new license (returns plaintext key once alongside the sealed EntryItem)$granted = $packages->grantLicense([ 'package_slug' => 'booking-kit', 'tier_key' => 'pro', 'external_order_ref' => 'ord_aegean_2026_104', 'quantity' => 1,]);
$license = $granted['licenses'][0]['license'];
// Renew update access, upgrade tier, or record a billing ledger entry$packages->renewLicense($license->id, days: 365);$packages->upgradeLicense($license->id, 'agency');$packages->recordBillingRecord([ 'license_id' => $license->id, 'amount_minor' => 19900, 'currency' => 'EUR', 'external_ref' => 'ord_aegean_2026_104',]);Domain Activation Quotas & Dev/Staging Exemptions
Section titled “Domain Activation Quotas & Dev/Staging Exemptions”When a site verifies a license via POST /packages/api/verify, Packages normalizes the host and classifies it:
- Production Domains: Count against the license’s
max_sitesquota (for exampleaegeanvoyages.example). - Exempt Dev/Staging Domains: Hosts matching
localhost,127.0.0.1,::1,*.local,*.test,*.ddev.site,dev.*, orstaging.*are logged inentries_tbl_packages_activationsfor visibility without consuming production site slots. - Strict Enforcement (
strict): When strict domain enforcement is enabled, verification requests that omit a domain are rejected withdomain_required.