mirror of
https://github.com/hanzoai/commerce.git
synced 2026-10-30 15:08:42 +00:00
- An active subscription past its paid period and the 72-hour grace, or a past-due one past the grace and the whole retry schedule, is lapsed: it confers no tier or plan, a new subscription on any purchase path replaces it at its paid period's end without billing the time since, and a late outside payment extends its lapsed external plan. - A past-due or unpaid subscription holds its subject: no second plan is sold beside it. - The renew endpoint reads the row under the org's cycle lock. Carrying an overdue row to now is guarded once per missed period end and made only when the row still ends where it was read. - The renewal step locks per subscription, taken once, so no step waits on a lock it holds. - A customer renewing an overdue row whose declined renewal's period is over is renewed from now instead of ended. - Seat and bundle rows follow their paying subscription's period, so members are served and granted each month the payment covers. - The cycle repeats, under its key, a payment attempt of unknown outcome that a canceled subscription's invoice still carries, and an immediate cancel that leaves one logs it. - A card renewal with no card on file is a decline in a dry run as live, and a dry run logs no alerts. - A live cycle is refused (409) while a subscription sits a period ahead of its paid invoice; a dry run reports each as realign_pending. - An operator's void is recorded on the invoice in the write that voids it, then in the billing event ledger once per invoice; a retry writes a missing event. - Every return of an invoice's collection to the balance is an invoice.returned billing event for refund review. Co-authored-by: Hanzo Dev <[email protected]>
107 KiB
107 KiB