Files
zooqueenandHanzo Dev 6fe76257bb Realignment is a one-time migration refused per org, a canceled customer's lost charge is looked up instead of sent again, and seats follow their team
The realignment records a cutover per org, on its first real run or the first
live cycle that finds nothing to move; only invoices issued before it make a
candidate, a realigned row is marked and never moved again, and comped rows are
never candidates. A live cycle skips only the org with rows awaiting it, and a
customer's renew waits for it too. The dry run names the rows the move lapses.

A canceled subscription's card attempt of unknown outcome is looked up by its
payment id, or cancelled by its idempotency key, and settled on the answer;
nothing asks for money again. A prepaid one goes straight back.

Seats are matched to their parent team, a replaced team's seats end with it,
and a seat's tier is read from its parent row. Replacing a lapsed plan voids
only invoices that collected nothing; money one collected toward a period it is
never served goes back through the cycle. Unpaid rows lapse like past_due ones.
Lapsed rows emit subscription_lapsed once and drop out of MRR, retired rows
emit subscription_canceled, and a late outside payment after a card rebuy is
recorded for a refund review.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-24 16:57:24 -07:00
..
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00
2026-09-23 21:52:16 -07:00