Repository navigation
Hosted billing: a renewal notice states the price a pending price change sets - #1589
Merged
Merged
Conversation
A yearly subscriber whose renewal was inside both the renewal notice's 30 days and a price change's 21 got both emails in one cron run, the renewal notice still giving the old price. It now states the change's new Price whenever that change's notice for the same renewal went, or can still go, early enough to apply. The Stripe setup also records that Link stays on, with its instant bank payments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying mouseterm with
|
| Latest commit: |
b2607ca
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://85b06662.mouseterm.pages.dev |
| Branch Preview URL: | https://renewal-notice-price.mouseterm.pages.dev |
dormouse-bot
approved these changes
Nov 5, 2026
19 of 27 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found in the Stripe sandbox for #1074 (2026-11-05, test clock): a yearly subscriber renewing in 20 days, with a price change from $100 to $120, got the price-change notice ("from $100 to $120 … starting with your renewal") and, in the same cron run, the renewal notice saying "for another year at $100". The renewal charged $120 plus VAT.
sendNoticesnow prices a renewal notice or annual reminder at the change's new Price when that change has a notice for the same renewal that went at least 7 days ahead, or is unsent and can still go in time (more than 8 days ahead). Otherwise it keeps the subscription's current Price, so a change that will not apply never shows.docs/specs/hosted.md-> "Billing notices" states the rule.hosted/README.md-> "Stripe setup" records the decision to keep Link on. Its instant bank payments ("Pay with Bank" at Checkout) cannot be switched off without turning Link off, and a refund to a bank account takes a few days to succeed.The new test covers a renewal inside both windows, a change notice sent too late, and one that can no longer go in time. It fails without the fix, and each branch of the guard was mutation-checked.
pnpm test:hosted: 374 passed. I'll rerun the sandbox scenario on this branch.🤖 Generated with Claude Code