Repository navigation
Description
TT ID: TT-030 · Severity: P2 · Area: Dashboard (billing) · Found by: QA · Refs #879 (release v1.22.18, #880)
Summary
Since v1.22.18, the upgrade buttons on Settings → Organization treat any org that has a Stripe customer as an existing subscriber. A Free org with no subscription that has ever opened Checkout (e.g. every Pro/Business pricing-CTA signup that backs out of Stripe) now sees "Change to Pro / Change to Business", and clicking them opens the Stripe Customer Portal instead of Checkout. The portal has no subscription, so it shows only "Payment method / Billing information / Invoice history" with no plan to pick. The user can't upgrade from this page.
The Billing & usage page is correct ("Upgrade to …" → Checkout), because #879 switched it to hasStripeSubscription. The organization page still passes billingHealth.hasStripeCustomer (settings/organization/page.tsx → OrganizationUsageCard → OrganizationBillingActions), and OrganizationBillingActions now uses that prop to choose portal vs Checkout and the label.
This hits the Checkout cancel path directly: Stripe "Back" (cancel_url) lands on /dashboard/settings/organization?billing=canceled, which now shows the broken "Change to …" buttons.
Steps (production v1.22.18, QA accounts, nothing paid)
- New user: Pricing → "Start with Pro" → register → create organization → Stripe Checkout opens (live). Don't pay. Click Stripe's "Back".
- You land on
/dashboard/settings/organization?billing=canceled. Create a project so the usage card renders (if none exists). - The card shows "Change to Pro (15 €/mo)", "Change to Business (99 €/mo)", "Manage billing". Plan: FREE.
- Click "Change to Pro". Actual: you're sent to billing.stripe.com (Customer Portal), with no subscription and no plan options. Expected: "Upgrade to Pro", which opens Checkout (first-time subscription, unchanged per test: add pricing flow integration tests and prevent duplicate subscriptions #879).
Control: a Free org with no Stripe customer shows "Upgrade to Pro" → Checkout (OK). The same org on /dashboard/settings/billing shows "Upgrade to Pro" → Checkout (OK).
Evidence
- Reproduced 6×, all 2026-10-27 CET on v1.22.18: an existing Free owner with a customer, Pro and Business (2), plus fresh accounts after an abandoned Checkout (qa14 Pro, qa16 Business), and the cancel landing page twice (2 fresh Business signups).
- On v1.22.17 (12:12 CET, before the dashboard deploy) the same account's org page showed "Upgrade to Pro/Business", so this is a regression from test: add pricing flow integration tests and prevent duplicate subscriptions #879.
Suggested fix
Pass a subscription-based flag (live/unpaid status, the same as the billing page's hasStripeSubscription) to OrganizationBillingActions from the organization page / OrganizationUsageCard. Keep "Manage billing" keyed on customer existence if wanted.
Activity
Fix TT-030: Abandoned checkout shows portal instead of Checkout (#883)
unjica commentedon Oct 27, 2026
QA verification on production v1.22.19 (release #884, fix #883; API /health 1.22.19 by 13:00:21 CET, dashboard footer v1.22.19 at 13:00:41 CET).
/dashboard/settings/organization?billing=canceledafter an abandoned Checkout shows "Upgrade to Pro/Business" (1/1, fresh account).No card entered, nothing paid. Verified fixed; closing.