A scheduled change is marked applied before Stripe carries it out, and is never retried #177

Open
opened 2026-10-06 21:24:47 +00:00 by cgalo5758 · 0 comments
Owner

core.subscription_scheduled_changes holds rows Stripe carries out (period end), which the reconcile in internal/fulfillment/reconcile.go follows, and rows only the console carries out (commitment boundary), which the sweep in internal/fulfillment/sweep.go fires. The sweep marks a row applied, then calls Stripe. If the call fails, no later sweep retries it, and a failed cancellation leaves the member billed. Nothing writes commitment-boundary rows yet; minimum terms will (#17, #38).

"Applied" is also written for changes that never happened: when a subscription ends, every still-scheduled row is marked applied, downgrades included. And one pending change per subscription is kept by the writers only, with no unique index.

Options: a firing and a failed state with a retry budget; applied only after Stripe confirms; or not storing period-end moves, which Stripe holds.

Done when: the billing model states who owns each kind of row and its states, a failed firing is retried or recorded, an ended subscription supersedes unapplied downgrades, and a partial unique index holds one pending change.

`core.subscription_scheduled_changes` holds rows Stripe carries out (period end), which the reconcile in `internal/fulfillment/reconcile.go` follows, and rows only the console carries out (commitment boundary), which the sweep in `internal/fulfillment/sweep.go` fires. The sweep marks a row applied, then calls Stripe. If the call fails, no later sweep retries it, and a failed cancellation leaves the member billed. Nothing writes commitment-boundary rows yet; minimum terms will (#17, #38). "Applied" is also written for changes that never happened: when a subscription ends, every still-scheduled row is marked applied, downgrades included. And one pending change per subscription is kept by the writers only, with no unique index. Options: a firing and a failed state with a retry budget; applied only after Stripe confirms; or not storing period-end moves, which Stripe holds. Done when: the billing model states who owns each kind of row and its states, a failed firing is retried or recorded, an ended subscription supersedes unapplied downgrades, and a partial unique index holds one pending change.
cgalo5758 added the
kind
design
area/billing
labels 2026-10-06 21:24:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#177