Files
zooqueenandHanzo Dev b7bb5f3d32 A subscription reads the seats and money its period's payment charged, a refund or dispute of that payment unpays the period, and a change of seats waits for the renewal that charges it
The subscriptions view gains Seats, ChargedCents and PendingQuantity. Seats and
ChargedCents come from the period's paid invoice (its plan line's quantity, and
its plan fee after discount less what was refunded) or from the seats and price
now recorded with an external period, never from the row's quantity; a period
recorded without them reads the row's seats at the plan's price.

Invoices record refunds by id and a dispute's state. A payment that paid an
invoice is indexed to it (models/paymentorg), so the processor's refund or
dispute marks that invoice instead of drawing on a wallet; a refund recorded
through the refunds API counts the same way and never exceeds what the invoice
still holds. A period refunded in full or disputed, open or lost, reads unpaid;
a dispute won restores it.

PATCH quantity sets the row's pending quantity; the renewal invoices it and the
row holds it from then, and an external plan takes it with the next recorded
period. Members never exceed the seats paid for now.

Co-authored-by: Hanzo Dev <[email protected]>
2026-10-01 13:44:35 -07:00
..
2026-09-23 21:52:16 -07:00