Upgrade/downgrade flow — tier changes without new DLID #631

Open
opened 2026-06-12 08:01:59 +00:00 by jmiller · 1 comment
Owner

Phase 5.2 — Tier Upgrade/Downgrade

Parent: #616 | Depends on: #618, #619, #630

Upgrade scenario

Customer has CRM license, purchases POS upgrade:

  1. Shop detects existing DLID for this customer
  2. Calls PATCH /api/v1/licensing/licenses/{id} with tier: "pos"
  3. Gitea updates license tier
  4. Entitlements auto-rebuilt: now includes Base + CRM + ERP + POS
  5. Customer's existing DLID immediately works for ERP + POS update servers
  6. No reinstall needed — next Joomla update check picks up new repos

Downgrade scenario

Customer downgrades from Suite to CRM:

  1. Tier changed to "crm"
  2. Entitlements rebuilt: only Base + CRM
  3. Existing extensions continue working (GPL) but no longer receive updates
  4. Update servers return empty XML for non-entitled products

Add-on scenario

Customer has POS license, adds HRM as individual add-on:

  1. Custom entitlement added: AddCustomEntitlement(licenseID, "hrm", "MokoSuiteHRM")
  2. HRM entitlement added WITHOUT changing tier
  3. Custom entitlements survive tier changes

Prorated billing (Shop side)

  • Calculate remaining days on current subscription
  • Credit toward new tier price
  • Extend or adjust expiry as needed

Acceptance criteria

  • Tier change rebuilds entitlements instantly
  • Same DLID works for new repos immediately
  • Downgrade removes update access but doesn't break installed extensions
  • Add-on entitlements persist across tier changes
  • Prorated billing calculation in Shop
## Phase 5.2 — Tier Upgrade/Downgrade Parent: #616 | Depends on: #618, #619, #630 ### Upgrade scenario Customer has CRM license, purchases POS upgrade: 1. Shop detects existing DLID for this customer 2. Calls `PATCH /api/v1/licensing/licenses/{id}` with `tier: "pos"` 3. Gitea updates license tier 4. Entitlements auto-rebuilt: now includes Base + CRM + ERP + POS 5. Customer's existing DLID immediately works for ERP + POS update servers 6. No reinstall needed — next Joomla update check picks up new repos ### Downgrade scenario Customer downgrades from Suite to CRM: 1. Tier changed to "crm" 2. Entitlements rebuilt: only Base + CRM 3. Existing extensions continue working (GPL) but no longer receive updates 4. Update servers return empty XML for non-entitled products ### Add-on scenario Customer has POS license, adds HRM as individual add-on: 1. Custom entitlement added: `AddCustomEntitlement(licenseID, "hrm", "MokoSuiteHRM")` 2. HRM entitlement added WITHOUT changing tier 3. Custom entitlements survive tier changes ### Prorated billing (Shop side) - Calculate remaining days on current subscription - Credit toward new tier price - Extend or adjust expiry as needed ### Acceptance criteria - [ ] Tier change rebuilds entitlements instantly - [ ] Same DLID works for new repos immediately - [ ] Downgrade removes update access but doesn't break installed extensions - [ ] Add-on entitlements persist across tier changes - [ ] Prorated billing calculation in Shop
Author
Owner

Branch created: feature/631-upgrade-downgrade-flow-tier-changes-with

git fetch origin
git checkout feature/631-upgrade-downgrade-flow-tier-changes-with
Branch created: [`feature/631-upgrade-downgrade-flow-tier-changes-with`](https://code.mokoconsulting.tech/MokoConsulting/MokoGitea-APP/src/branch/feature/631-upgrade-downgrade-flow-tier-changes-with) ```bash git fetch origin git checkout feature/631-upgrade-downgrade-flow-tier-changes-with ```
Sign in to join this conversation.