Skip to content

Hosted billing: refund corrections, lapsed founders, and a page after closing - #1560

Merged
nedtwigg merged 6 commits into
mainfrom
billing-truth
Nov 4, 2026
Merged

nedtwigg merged 6 commits into
mainfrom
billing-truth

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Nov 3, 2026

Copy link
Copy Markdown
Member

Part of the billing release gate, #1074. Billing still ships closed. Brings the code and the Terms into line where they disagreed.

  • A correction keeps the subscription. A whole-charge refund still ends the subscription by default, but one whose newest refund carries dormouse_keep_subscription=true does not. The mark is read from Stripe's refund list on every delivery, since the event embeds no refunds at the pinned API version. Audited rule S285 carves it out, and hosted/README.md -> "Refund by hand" says how. The Terms say a billing correction alone does not end a subscription.
  • A lapsed founder pays list. A real Stripe sandbox showed a founder cancelled for non-payment offered founding at $50 again; the Terms say list. foundingLapsed follows the seat count's rule: an ended founding subscription that kept its seat lapses the offer, and one ended inside the 30-day window returned its seat, so that buyer may buy again. A stale page gets 409 PRICE_CHANGED. The rule fires when the subscription ends, so a founder's card update while past_due keeps the price past the Terms' 30 days, in the customer's favour.
  • Seat wording. The Terms said any founding refund returns the seat; only the first payment's does, while its cohort is on sale. TERMS_VERSION moves to 2026-11-03. Needs the owner's legal review.
  • After closing an account the page went to the devlog's signup. It now lands on /closed on the account origin, which confirms it and states the refund rule. The pre-launch notice and prelaunch.ts are untouched.

An account closure deletes the account row, so a closed founder returning under a new account isn't recognized; docs/specs/pricing.md says so.

pnpm test:hosted (354), tsc, and website tests (461) pass on the fakes, with each new test mutation-checked; the test suite last ran before the two doc-only commits. In the sandbox I checked only that the README's refund command stores the mark. The event path with real Stripe is still to be retested.

🤖 Generated with Claude Code

nedtwigg and others added 6 commits November 3, 2026 13:03
…the subscription

The Terms say a billing correction alone does not end a subscription, but any
fully refunded charge ended it. A refund carrying dormouse_keep_subscription=true
now keeps it, read from Stripe on every delivery since the event embeds no
refunds. The newest refund decides, so a mark on an earlier partial refund does
not bind the refund that completes the charge. An unmarked full refund still ends it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Terms and FAQ say subscribing again after a founding subscription lapses is
at list, but checkout offered founding to anyone not holding a plan. The server
now answers foundingLapsed and null founding for an account whose earlier
founding subscription ended and kept its seat, by the rule the seat counts use,
and refuses founding checkout with PRICE_CHANGED so a stale page rereads. A
subscription ended inside the refund window returned its seat, so its buyer may
buy again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A refund inside the first-payment window returns a seat; refunding a yearly
renewal does not, and a closed cohort never reopens. The Terms said any founding
refund did. Moves TERMS_VERSION with the revision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closing an account signed the page out, so the pre-launch notice sent the person
to the devlog's signup a few seconds later. They now land on /closed on the
account origin, which confirms the closure and says what happens to any refund.
The notice stays for the sign-in gate alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
S285 said a full refund always ends the subscription, which the correction
marker now contradicts; it also pins the mark to Stripe's refund list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a1b5620
Status: ✅  Deploy successful!
Preview URL: https://baff6bb0.mouseterm.pages.dev
Branch Preview URL: https://billing-truth.mouseterm.pages.dev

View logs

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found nothing to change in the diff. I'm not approving because the description still lists two things to do before merge: the owner's legal review of the Terms wording (TERMS_VERSION 2026-11-03), and a retest of the charge.refunded correction path against real Stripe. Only the README's refund command has been checked in the sandbox so far.

@nedtwigg
nedtwigg merged commit d94be5d into main Nov 4, 2026
18 of 19 checks passed
@nedtwigg
nedtwigg deleted the billing-truth branch November 4, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants