Repository navigation
Hosted billing: purchase confirmation email, an archive of each terms version, and fuller consent records - #1561
Merged
Merged
Conversation
Checkout and the billing confirmation link the agreed version's archive. Moving TERMS_VERSION without its files, or changing a policy's text without moving it, fails a test; published files are pinned by hash. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…given to The disclosure lines move to one module the page renders and the consent row keeps, with the shown price and the voice cap, all derived on the server. Assertions pin the refund, limits, and withdrawal lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e page expectPrice compares the page with the catalog, and the catalog's amounts come from the published prices, so nothing compared them with Stripe. A wrong configured amount would have been charged. Checkout now reads the Price it opened at and expires the checkout unless Stripe holds it at that amount, in USD, at the plan's interval and in this deployment's mode. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A billing notice recorded in the webhook's transaction when a checkout completes, one per subscription, sent after the commit and retried by the cron until sent. It repeats the consent's plan, price, and terms version, with the seller, renewal, cancellation, refunds, limits, and the EEA and UK withdrawal right and model form from the strings the page shows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying mouseterm with
|
| Latest commit: |
48c816b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2e7c205e.mouseterm.pages.dev |
| Branch Preview URL: | https://billing-confirmation.mouseterm.pages.dev |
Hosted/Emails gives each billing notice and the sign-in code a story, so each gets a snapshot of what its recipient sees. A billing notice's text moves to notice-message.ts, which a browser can bundle. A new notice kind fails to compile until it has a story, and the sign-in email's fixture is held to what the Worker sends. The stories show the real From: postmarkEmail sends EMAIL_FROM, whatever a message names. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 3, 2026
`postmarkEmail` sends the address it is built with and ignores a message's `from`, so every notice would have gone out from [email protected]. Notices now go by a sender built with the support address, which the README already requires verifying in Postmark; sign-in mail keeps EMAIL_FROM. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 3, 2026
Terms version 2026-11-03 takes its own archive beside 2026-10-30. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 4, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 4, 2026
The Terms say the prices are in US dollars. Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 4, 2026
This was referenced Nov 4, 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.
Part of the billing release gate, #1074. Billing still ships closed. A buyer got only Stripe's receipt and a
/billingpage that goes away with the plan, and only a version string recorded what they agreed to.Purchase confirmation email. A new
purchasenotice, recorded in the webhook's transaction when a checkout completes and sent after the commit to the Stripe customer's email, so a provider-only account gets it. One per subscription, so a redelivery sends nothing; the cron retries an unsent one. It carries the seller, plan, USD price and interval, renewal, the terms version and when it was agreed, cancellation, refunds, limits, and the withdrawal right with the model form. Its price comes from the consent row, not the current catalog.Each terms version keeps its text. Checked-in static files at
https://dormouse.sh/terms/<version>/and/privacy/<version>/, linked from the checkout,/billing, and the email.website/src/pages/policy-archive.test.tsxfails ifTERMS_VERSIONmoves without its file, if a file differs from what the page renders, or if a published file changes.Consent evidence.
dormouse_checkout_consentsalso keeps the shown price, the daily voice cap, and the text presented, all derived on the server. The strings live inhosted/server/disclosure.ts, which the page renders too.A real price check, and each disclosure line asserted. Checkout shows a plain "$50 a year", by the owner's decision: the Terms say the prices are in US dollars, and Release gate: Hosted billing must fulfill the subscription terms #1074's "USD price" box rests on that.
expectPricecompared the page with published constants only, so a Price set up at another amount in Stripe would have been charged.stripeHoldsPricenow checks amount, currency, interval, and mode against Stripe; a mismatch or failed read expires the checkout and answers 503CHECKOUT_UNAVAILABLE.Hosted/Emailsin Storybook. A story for every email Hosted sends, showing headers, HTML, and plain text, so Argos snapshots what the recipient sees. A new notice kind fails to compile until it has a story, andworkers.test.tsholds the sign-in email's fixture to what is sent.TESTING_AND_MODIFICATION_GUIDE.mdcarries the rule. A notice's text moved tonotice-message.tsso a browser can bundle it.Notices really come from support.
postmarkEmailsends the address it is built with and ignores a message'sfrom, so every notice would have gone out from[email protected], against the README. Notices now use a sender built with[email protected], which must be verified in Postmark before launch.Migrations 026 and 027. The website must deploy before or with Hosted, or the checkout's terms link 404s. A privacy-only edit now forces a new
TERMS_VERSION, since both pages share one date.pnpm test:hosted(357),tsc, spec lint, and website tests (465) pass on the fakes, with new tests mutation-checked; the rootpnpm testwas not run locally. Not yet run against real Stripe or Postmark: the email has not been delivered, andprices.retrieveis proven only against the fake. A sandbox retest follows.For legal review: the email goes to every buyer, as the checkout's disclosure does, and its withdrawal paragraph says "within 14 days of buying" where the Terms say "after the contract is made".
🤖 Generated with Claude Code