Skip to content

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).

Define standard commercial structures once in packages-tiers (for example single, pro, agency):

  • License Model: one_time_updates, subscription, lifetime, or trial.
  • Quotas: Maximum production sites (max_sites), team seats (max_seats), and update_days (for example 365).
  • Renewal Discount: Percentage discount applied when renewing a one_time_updates license 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 example Aegean Complete Suite containing booking-kit and charter-sync).
  • All-Access Pass (include_all_packages): Automatically grants access to every published package in the registry, including newly released modules.
<?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',
'owner_email' => '[email protected]',
'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_sites quota (for example aegeanvoyages.example).
  • Exempt Dev/Staging Domains: Hosts matching localhost, 127.0.0.1, ::1, *.local, *.test, *.ddev.site, dev.*, or staging.* are logged in entries_tbl_packages_activations for visibility without consuming production site slots.
  • Strict Enforcement (strict): When strict domain enforcement is enabled, verification requests that omit a domain are rejected with domain_required.
Both production and exempt staging domains appear in Domain Activations while only production hosts consume license slots.

Next steps