Skip to content

7-day trial on a first subscription; webhooks read Stripe's current state - #18

Merged
maxjneto merged 1 commit into
developfrom
feat/stripe-trial
Nov 5, 2026
Merged

maxjneto merged 1 commit into
developfrom
feat/stripe-trial

Conversation

@maxjneto

@maxjneto maxjneto commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner
  • STRIPE_TRIAL_DAYS (default 7, 0 = off): card up front, first subscription only (abandoned checkouts don't count).
  • Events: trial_started → subscription_started (from_trial); subscription_canceled.during_trial; checkout_started.trial_days.
  • Webhook reads the subscription back from Stripe (out-of-order delivery can no longer undo a cancellation; a failed read returns 500 so Stripe retries).
  • paused drops to Free.
  • Pricing page note: 7 days free on the first subscription.

Test plan: backend 177 (8 new billing tests), frontend 111, tsc, ruff, vite build; trial checkout params accepted by Stripe test mode (R$ 0 due today).

…ipe's current state

- STRIPE_TRIAL_DAYS (default 7, 0 = off): card up front, only when the customer
  never had a subscription (a checkout abandoned before paying doesn't count).
- trial_started, then subscription_started (from_trial) on the first charge;
  subscription_canceled says whether it ended during the trial.
- subscription.updated/deleted read the subscription back from Stripe, so a late
  'active' delivered after a cancellation no longer hands Pro back.
- 'paused' drops to Free like canceled/unpaid.
- Pricing page: '7 days free on your first subscription'.
@maxjneto
maxjneto merged commit 15a8524 into develop Nov 5, 2026
4 checks passed
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.

1 participant