Skip to content

fix(marketing): carry paid pricing CTA plan intent into Stripe Checkout - #872

Merged
unjica merged 1 commit into
developfrom
cursor/pricing-cta-plan-intent-eb83
Oct 27, 2026
Merged

unjica merged 1 commit into
developfrom
cursor/pricing-cta-plan-intent-eb83

Conversation

@unjica

@unjica unjica commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Base branch: develop

Summary

This PR fixes the pricing page CTAs to carry paid plan intent through registration/login into the existing Stripe Checkout flow. Previously, Pro and Business CTAs said "Start free, upgrade later" and linked to /register with no indication of plan intent. Now they clearly label the plan and carry ?plan=pro|business through the auth flow to auto-trigger Checkout when eligible.

Changes:

  • Pricing CTAs: paid tiers now show "Start with Pro/Business" (unauthenticated) or "Upgrade to Pro/Business" (authenticated) with ?plan=... query params
  • Added plan parsing helpers: parsePaidPlanQueryParam, paidPlanQueryToCheckoutTier in plan-pricing.ts
  • RegisterPageForm: redirects to billing with plan after successful registration when plan=pro|business
  • crossAuthHref: preserves plan param across register↔login, sets next to billing when plan is set
  • Middleware: preserves plan on legacy ?signUp=1 redirects, redirects signed-in users on /register?plan=... to billing
  • BillingPlanIntent client component: auto-triggers Checkout once when eligible plan query param is present
  • Comprehensive tests: pricing CTAs, plan parsing, crossAuthHref, register redirect, middleware, billing intent (6 new test files)

No changes to:

  • Stripe integration, session creation, webhooks, price IDs, or billing business logic
  • Invite, referral (ref/via), or next safety rules

How to test

Local:

pnpm lint && pnpm test && pnpm build

All checks pass. See attached QA-PLAN.md for manual testing scenarios.

Key flows to verify (preview deploy):

  1. Logged-out /pricing: Pro CTA → "Start with Pro" → /register?plan=pro
  2. Register with ?plan=pro → lands on /dashboard/settings/billing?plan=pro → Checkout starts
  3. Signed-in /pricing: Pro CTA → "Upgrade to Pro" → /dashboard/settings/billing?plan=pro → Checkout
  4. Switch to Sign in from /register?plan=pro → /login has next pointing to billing with plan
  5. Signed-in user visits /register?plan=business → redirected to billing with plan

Code review (Bugbot)

Paused: GitHub bugbot-review is currently a no-op. /review-bugbot is optional.

  • For notification, alert, billing, ingest, or auth changes: considered running /review-bugbot in Cursor (optional while the gate is paused)

Checklist

  • Tests pass (pnpm test)
  • Lint passes (pnpm lint)
  • Build succeeds (pnpm build)
  • CHANGELOG.md updated under [Unreleased] (skipped per instructions: minimal UX fix)
  • Documentation updated (N/A)
  • New code follows the existing style
  • No breaking changes

Security / privacy

No auth, ingest, or data-handling changes. Plan intent is client-side only (query params) and does not alter Stripe session creation or webhooks.

Open in Web Open in Cursor 

- Update pricing CTAs: paid tiers now show 'Start with Pro/Business' (unauthenticated) or 'Upgrade to Pro/Business' (authenticated)
- Add plan query param helpers: parsePaidPlanQueryParam, paidPlanQueryToCheckoutTier
- RegisterPageForm: redirect to billing with plan after registration when plan=pro|business
- crossAuthHref: preserve plan param across register↔login, set next to billing when plan set
- Middleware: preserve plan on legacy ?signUp=1 redirects, redirect signed-in /register?plan=... to billing
- BillingPlanIntent: auto-trigger Checkout once when eligible plan query param present
- Add comprehensive tests: pricing CTAs, plan parsing, crossAuthHref, register redirect, middleware, billing intent
- Zero changes to Stripe integration, webhooks, or billing business logic

Co-authored-by: Sanja Malovic <[email protected]>
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.

2 participants