Skip to content

Customer Portal & Storefront

Packages ships both a turnkey Customer Portal (/portal/*) and a Storefront PHP API so your public marketing pages, pricing tables, and documentation pages stay synchronized with your package catalog.

Route Purpose
/portal/dashboard Lists all active licenses, downloadable packages, latest versions, and update expiry dates.
/portal/package/{slug} Displays release history, changelogs, versioned ZIP + .sha256 downloads, Composer install instructions, and active domain activations.
/portal/billing Shows billing ledger entries, renewal actions, and Payments invoices/portal links when integrated.
/portal/tokens Lets customers create, copy once, and revoke pkg_tok_... Composer v2 credentials.
POST /portal/action/* CSRF-protected self-service actions (create/revoke Composer token, deactivate a domain slot, trigger renewal checkout).
POST /portal/logout Signs out cleanly and clears browser history state via Inertia::clearHistory(true).

Every authenticated /portal/* response enables encryptHistory(true) and emits Cache-Control: private, no-store, max-age=0 headers so sensitive license keys and download tokens are never cached by shared proxies or visible via the browser Back button after logout.

Bind packages and bundles to native ProcessWire pages via unique 1:1 product_page_id fields and documentation page references, then query them directly from your site/templates/*.php files:

<?php namespace ProcessWire;
$packages = Packages::requireInstance($wire);
// Browse public catalog or fetch one package by slug
$catalog = $packages->catalog();
$bookingKit = $packages->package('booking-kit');
// Check what the signed-in customer already owns
$access = $packages->userPackageAccess($user, 'booking-kit');
// Resolve packages or bundles bound to the current ProcessWire product or docs page
$productPkg = $packages->packageForPage($page);
$productBundle = $packages->bundleForPage($page);
$docPkg = $packages->packageForDocsPage($page);
$docPkgs = $packages->packagesForDocsPage($page);
$docBundle = $packages->bundleForDocsPage($page);
$docBundles = $packages->bundlesForDocsPage($page);
Each package can be linked 1:1 to a ProcessWire product page and to one or more documentation pages.

Next steps