Embed Widgets1 min read
AforoSubscriptionManager
Paginated customer subscription table with status filters and status-aware lifecycle actions (Manage, Upgrade, Cancel, Update payment, Resume, Re-subscribe). Read-only — actions emit events the parent page handles.
Updated 2026-06-15Suggest edits
Docs Embed Widgets SubscriptionManager
What it renders#
A paginated table of the authenticated customer's subscriptions with status-aware lifecycle actions per row.
- 5-state filter chip row: All / Active / Trialing / Past due / Paused
- Per-row columns: offering name, status pill (text + color), current period range, MRR, renewal date
- Status-aware action set: ACTIVE/TRIALING → Manage + Upgrade + Cancel; PAST_DUE → Update payment; PAUSED → Resume; EXPIRED/CANCELLED/SUSPENDED → Re-subscribe
- Pagination footer with Previous / Next + page indicator
- In-widget 30s client cache — filter scrubbing within the cache window doesn't re-fetch
- Narrow layout (<640px) auto-collapses to single-row card mode; wider layouts render full table
INFO
SubscriptionManager is read-only with action events. Clicking an action button emits an
aforo.subscription.* event for the parent page to handle — the widget never opens a checkout or pause flow itself. To wire the full upgrade/cancel UI, listen for the event and either navigate the customer or open your existing flow.Mount examples#
Props reference#
Action matrix#
The widget renders a different action set per row based on subscription.status. Each button emits a dedicated event the parent page handles.
Events#
SubscriptionManager emits the following events. All event payloads conform to FR-SEC-21 — no customer id leaked, only safe identifiers like subscriptionId and offeringId. See the for full payload shapes.
aforo.subscription-manager.ready— emitted once after first data paintaforo.subscription-manager.filter_changed— filter chip flipaforo.subscription.clicked— row click (Manage button)aforo.subscription.upgrade_requested/downgrade_requested/cancel_requested/pause_requested/resume_requested/payment_update_requested/resubscribe_requestedaforo.subscription-manager.error— fetch failure or render error (typed code in payload, never PII)
Limitations#
- Read-only. The widget never mutates subscription state itself. All actions emit events; the parent page wires the lifecycle flow (often by navigating to the storefront, opening a checkout flow, or calling your own portal API).
- Sort is fixed. Server-side sort is hardcoded to
createdAt DESC. Sortable column headers are Phase 1. - No SSE on subscription state changes (yet). Refresh-after-action is parent-driven — emit
aforo:subscription-refresh-requestedto the widget after a flow completes and the next fetch returns fresh data. Server-pushed updates are filed for a follow-up release. - No magic-link fallback yet. SubscriptionManager requires a bridge token. The shared magic-link auth surface (already shipped for InvoiceList) lands here in a subsequent minor.