Documentation
¶
Overview ¶
Package subscriptions is the fleet SUBSCRIPTION view (/v1/admin/subscriptions) — every tenant's plan subscription: customer/org, plan, status, monthly-normalized MRR, and the current-period start/renews. SuperAdmin only (core.Guard).
Like invoices (and revenue) it fans out the org directory concurrently and reads each org's subscriptions via the admin S2S seam, tagging every row with its owning org. The MRR is monthly-normalized in the commerce reader so a yearly plan is comparable to a monthly one. Best-effort per org (a failed read contributes no rows, never fabricated ones); optional ?org= scopes to one tenant, ?status= filters, ?limit= caps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SubscriptionRow ¶
type SubscriptionRow struct {
ID string `json:"id"`
Org string `json:"org"`
Display string `json:"display"`
User string `json:"user"`
Plan string `json:"plan"`
Status string `json:"status"`
MRRCents int64 `json:"mrrCents"`
Started string `json:"started"`
Renews string `json:"renews"`
}
SubscriptionRow is one row of GET /v1/admin/subscriptions — a tenant's subscription at a glance, tagged with its owning org. MRR is USD cents; timestamps are RFC3339 strings.