From 2f534c6c3174701dae6c4b410a0f3631233dea6b Mon Sep 17 00:00:00 2001 From: Hoid Date: Tue, 17 Feb 2026 10:50:16 +0000 Subject: [PATCH] Session 48b: BUG-070 FIXED (Stripe cancellation downgrade), state updated --- projects/business/memory/sessions.md | 13 +++++++++++++ projects/business/memory/state.json | 7 ++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/projects/business/memory/sessions.md b/projects/business/memory/sessions.md index caea1d3..7c5dd7d 100644 --- a/projects/business/memory/sessions.md +++ b/projects/business/memory/sessions.md @@ -1100,3 +1100,16 @@ - BUG-061: /status not in sitemap - BUG-067: No skip-to-content link - BUG-069: /docs has no footer + +## Session 48b — 2026-02-17 10:43 UTC (Investor Report Follow-up) +- **BUG-070 CRITICAL: Stripe cancellation not downgrading Pro keys — FIXED** + - Root cause: three bugs: (1) only handled `customer.subscription.deleted` not `updated`, (2) `revokeByCustomer` deleted keys instead of downgrading, (3) no product filter on cancellation + - Fix: replaced `revokeByCustomer` with `downgradeByCustomer` (sets tier='free'), added `customer.subscription.updated` handler with product filter, added `isDocFastSubscription()` helper + - Manually downgraded cancelled customer (dominik.polakovics@cloonar.com, cus_TzUTRCa4JEoYN5) from pro→free in DB + - Commit 855068a deployed, verified on production + - **Remaining action:** Investor must add `customer.subscription.updated` event to Stripe webhook (we_1T12icRtlDv9c8Go9JpzfuXX) in Dashboard → Developers → Webhooks +- **Noted:** Investor applied sticky navbar directly on server. All future code changes go through CEO. +- **Open items needing investor action:** + 1. BUG-050: Fix MX DNS record in Hetzner DNS + 2. BUG-049: Enable Stripe invoice emails + 3. Add `customer.subscription.updated` to Stripe webhook events diff --git a/projects/business/memory/state.json b/projects/business/memory/state.json index fb3d42e..dca4310 100644 --- a/projects/business/memory/state.json +++ b/projects/business/memory/state.json @@ -3,7 +3,7 @@ "phaseLabel": "Build Production-Grade Product", "status": "near-launch-ready", "product": "DocFast — HTML/Markdown to PDF API", - "currentPriority": "1) BUG-050 CRITICAL: Fix MX DNS record (investor action). 2) BUG-049 invoice fix (investor action). 3) Sub-agents completing LOW fixes + QA audit.", + "currentPriority": "1) BUG-050 CRITICAL: Fix MX DNS record (investor action). 2) BUG-049 invoice fix (investor action). 3) Add customer.subscription.updated to Stripe webhook events (investor action).", "ownerDirectives_PRIORITY": "Process these IN ORDER. Do not skip.", "ownerDirectives": [ "Stripe: owner has existing Stripe account from another project — use same account, just create separate Product + webhook endpoint for DocFast.", @@ -19,7 +19,8 @@ "STATUS PAGE: The health link on the website currently points to the raw API /health endpoint which returns JSON — unprofessional. Create a proper /status page with a nice UI showing service status, uptime, response time, etc. Keep the raw /health API endpoint for monitoring, but the public-facing link should be a styled status page.", "SUPPORT EMAIL LIVE: support@docfast.dev is now active in FreeScout. The CEO can spawn a support agent that accesses FreeScout via API to handle customer inquiries. Update the website contact/support references to use this address.", "BUG-049 HIGH: Pro customers do not receive an invoice after payment. This is legally required in Austria/EU. Stripe can auto-generate invoices for subscriptions — enable Stripe Invoicing or implement invoice generation. Customer must receive a proper invoice with: company name, ATU number, invoice number, date, amount, VAT breakdown.", - "WEBSITE TEMPLATING: DONE — Build-time system with partials (nav/footer/styles). Source in public/src/, build with node scripts/build-html.cjs." + "WEBSITE TEMPLATING: DONE — Build-time system with partials (nav/footer/styles). Source in public/src/, build with node scripts/build-html.cjs.", + "BUG-070 CRITICAL: Stripe subscription cancellation does not downgrade Pro keys. Three bugs: wrong event (only handles deleted, not updated), revokeByCustomer deletes instead of downgrading, no product filter on cancellation. Fix dispatched." ], "launchChecklist": { "emailVerificationReal": true, @@ -104,7 +105,7 @@ ], "MEDIUM": [], "LOW": [], - "note": "Session 48: Fixed 13 bugs total. BUG-050 CRITICAL (MX DNS) + BUG-049 HIGH remain — both need investor action. Audit #18, #25 fixed. QA audit BUG-051-069 found, 11 fixed (056/057/059/062/063/064/065/066/068 + 051/052)." + "note": "Session 48: BUG-070 FIXED (Stripe cancellation downgrade). BUG-050 remains (DNS). BUG-049 remains (invoice emails). Webhook needs customer.subscription.updated event added in Stripe Dashboard." }, "blockers": [ "BUG-050: MX DNS record for docfast.dev is broken (resolves to mail.cloonar.com.docfast.dev instead of valid host). Email delivery fails for servers doing sender verification. Investor must fix in Hetzner DNS."