Repository navigation
Billing: a cancel within 3 days of a renewal is refunded; shorter cancel popups - #260
Merged
Merged
Conversation
…cel popups The owner, 2026-11-18: "If they cancel genclass within the first 3 days of it being renewed let them get a refund", and the popups' "not on <date>. Nothing is refunded for the days left." is extra and goes. POST /api/billing/cancel first gives the last payment back to the card, in full, when it was a renewal (the charge at the end of the trial and each month's after it; never the charge that starts a subscription, so subscribing again after a cancel is not a free plan) of the last 3 days, then ends the plan. A refund that fails never stops the cancel; the owner's notice says what went back or why nothing did. The popups say the plan ends as soon as you cancel, and name the refund only when there is one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
The owner, 2026-11-18: "If they cancel genclass within the first 3 days of it being renewed let them get a refund", and the popups' "not on . Nothing is refunded for the days left." is extra and goes.
POST /api/billing/cancelfirst gives the last payment back to the card, in full, when it was a renewal of the last 3 days, then ends the plan (src/stripe.tsrefundableOnCancel, through the refund code plan switches already use: idempotent, never a balance credit). A renewal is the charge at the end of the trial and each month's after it; the charge that starts a subscription is not one, so subscribing again after a cancel is not a free plan. It answers{ ok, ended: true, ends: null, refunded }.plan_cancellednotice says what went back, or why nothing did.GET /api/billing/cancelsaysrefund(the amount, when a cancel now gives it back).Checks: tsc clean;
telemetry-workervitest:test/cancel.test.ts17 passed (3 new). The full suite passed 923 of 924 and then 920 of 924 on a Mac at load 30, different tests each time (timeouts); the files that failed pass on their own.🤖 Generated with Claude Code