A downgrade Stripe holds is not shown when the console never recorded it #307
Open
opened 2026-10-31 00:29:59 +00:00 by cgalo5758
·
1 comment
Labels
Clear labels
accessibility
area/billing
area/catalog
area/discourse
area/domains
area/entitlements
area/fedwiki
area/identity
area/integrations
area/licensing
area/member-ui
area/meta
area/operator-ui
area/ops
area/testing
duplicate
good-first-issue
invalid
privacy
security
upstream
wontfix
A barrier for people using assistive technology or a keyboard alone.
The Stripe mirror, checkout, subscriptions, invoices, fulfillment.
Products, prices, plan ladders, purchasability.
The Discourse integration.
The domains registry, claims, placements, the certificate ask.
Entitlement sets, rules, grants, pools, provisioning.
The Federated Wiki integration and farm sync.
Sign-in, sessions, persons, organizations, workspaces, roles.
The provider registry, outbox and webhooks in general.
Licenses, the contributor agreement, SPDX headers.
Member pages.
The repository itself, its contributing guide, CI, the tracker and the workflow.
Operator pages, forms, lists, the design system.
Deployment, configuration, migrations, workflows, instance settings.
The test stack, screens, lint, walkthroughs.
Closed because another issue already covers it.
Small, self-contained, and explained enough to be a first contribution.
Closed because it is not a ticket for this repository.
Touches what a person's data reveals.
Touches authentication, authorization, secrets or data exposure.
Waits on another repository or project before it can move.
Closed because it will not be done, with the reason in the last comment.
kind
bug
The software does something other than what it promises; closed when it again does what it promises.
kind
debt
Code, tests or tooling to clean up with nothing visible changing; closed when they are cleaner.
kind
design
A question to settle before work can be defined; closed when the decision is written down.
kind
docs
Documentation that is wrong or missing; closed when it says the right thing.
kind
enhancement
Something the software does not do yet; closed when it does.
priority
critical
Blocks the active milestone or harms members now.
priority
high
Next in line inside the active milestone.
priority
low
Inside the active milestone, when nothing else is left.
priority
medium
Inside the active milestone, after the high ones.
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wiki-cafe/member-console#307
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
The console records a scheduled downgrade only in the switch that schedules it. The reconcile, which keeps the console's record true to Stripe, takes a recorded downgrade back when Stripe no longer holds it, but never records one Stripe holds.
A switch can make its last Stripe call, the update of the subscription schedule that carries the downgrade, and still leave no record. That happens when neither the call's answer nor the answer to its resend reaches the console, when Stripe answers it with a server error (which Stripe repeats to the resend), when Stripe is still executing it as the resend arrives, when the console's process stops between that call and the record, or when the console fails to write the record. Stripe then holds the downgrade and the console shows none: the plan's card names no downgrade, Keep plan finds nothing to take back, and the renewal moves the member down.
What should happen
The reconcile records a period-end downgrade from the subscription schedule the console attached, whose metadata names the price it was made from and whose last phase names the target, as it already takes one back when the schedule is gone. It also supersedes a period-end downgrade whose target the schedule's last phase does not carry, so two downgrades made close together leave one. Once it does, the resend of the downgrade's update becomes redundant and is removed, so that the console does not keep two mechanisms for one fact.
Where
internal/fulfillment/reconcile.go(convergeScheduledChanges),internal/fulfillment/plan_change.go(downgradeAtRenewal,sendScheduleUpdate)Why it matters
A member can be moved to a lower plan that the console never showed as scheduled and that Keep plan cannot take back.
Related: #177, #219, #275.
One more cause, on the first send rather than the resend. The Stripe library retries a write itself after a network fault, with the same idempotency key. If Stripe is still executing the first attempt when that retry arrives, Stripe answers 409, the library retries the 409 twice within about two seconds, and then returns it. The console reads a 409 as an answer from Stripe, so it treats the update as refused and does not send it again, although the first attempt can still land. Stripe then holds the downgrade and the console has no record of it, as above.