Buying a cheaper plan silently discards the days already paid for
A wallet on an active paid plan can buy a cheaper one, and doing so throws away whatever was left of the period already paid for. Nothing in the UI says so.
What happens
isPlanSelectable (src/components/subscription/planFeatures.ts) blocks only
one card: the CURRENT plan while its subscription is active — that guard
exists so an early re-buy cannot reset the window. Every other card stays
selectable, including a cheaper one.
The checkout then runs the normal in-place upgrade path, and the gateway
fulfils it with changePlan(key, planId, expiry) — the new plan with a fresh
30 days. There is no proration and no credit for the unused remainder, so a
user with 25 paid days left on Premium who buys Basic ends up with 30 days of
Basic and the 25 Premium days simply gone.
Why it is the wallet's problem too
The gateway owns active_until and is the only place that could prorate or
extend (raised as item 4 of
unicitynetwork/aggregator-subscription#83). But the wallet is where the
irreversible click happens, and it currently presents that click as an ordinary
plan choice — the grid gives a cheaper plan exactly the same affordance as a
more expensive one.
Options
- Warn before the purchase. Keep the card selectable, but when the target
is cheaper than the active plan and the subscription is still
active, confirm explicitly: how many days are being discarded and that they are not refunded. Needs onlyactiveUntil, which the wallet already has fromuseUtilization. - Refuse while active, the way re-buying the current plan is refused, and say the change becomes available when the plan lapses.
(1) is the smaller change and leaves the choice with the user; (2) is safer but takes away a legitimate move.
Either way this stays wallet-side and does not wait on the gateway: it costs a predicate over the price of the active plan vs the selected one.
Related
- unicitynetwork/aggregator-subscription#83 — item 4, where proration would have to live
- #509 — the billing surface that would also have to explain what a plan change did to the paid period
Source: unicity-sphere/sphere