Card trial for sign-ups from Claude, with a guaranteed way back to approve - #842
Merged
Merged
Conversation
…prove A new workspace admin who signs up from "Connect" in Claude is offered the card trial once, after verifying their email and before approving the connection. The pending authorization (kept 30 minutes by the backend) is remembered across the detour, so every way out ends on the consent page: - "Continue without payment details" goes straight back; - a cancelled checkout returns to /start-trial (Stripe's cancel URL), where skipping goes back; - a completed checkout returns to /settings/license/activate, which activates the licence and goes back instead of opening settings. Members, workspaces without a running trial and an expired way back skip the offer. Through MCP, billing is mentioned only when the plan's connector limit stops an install: an admin on the free trial gets the card-trial page, other admins the licence page, members who to ask.
keysersoft
enabled auto-merge (squash)
October 3, 2026 13:10
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Follow-up to the onboarding work (#834). Today a user who signs up from "Connect" in Claude goes straight back to Approve and never sees
/start-trial, so every directory sign-up lands on the no-card trial.Flow (new admin, signing up inside the Claude authorization)
Register → verify email →
/start-trial("Either way, you go straight back to finish connecting your AI client") → Approve → (empty workspace page from #834) → back to Claude.The pending authorization is remembered in localStorage (
/auth/…paths only, 30 minutes = the backend's OAuth session), so every way out of the offer returns to the consent page:/start-trial→ skip → back./settings/license/activate#key=…→ licence activated → back to approve (instead of settings). No change on the website or in Stripe.Not offered (straight back, as before): non-admins, no running trial, an expired way back. An existing user signing in is never offered it (only right after verification).
MCP
Billing only appears when the plan's connector limit stops
setup_install_connector: an admin on the free trial getsupgradeUrl: /start-trial("nothing is charged before the trial ends"), other admins/settings/license, members "ask an administrator" with no link. No proactive upsell in tool results.Tests
card-trial-claude-signup.spec.ts: offered once + skip → back; completed checkout → activate → back; cancelled checkout → skip → back; EDITOR and no-trial go straight back; expired way back ignored. Full frontend e2e: 106 passed./start-trial→ Stripe Checkout opened (cs_test_…) → back without paying → skip → Approve → "Claude is connected" → client receivedcode+state→ token exchange →/mcplists the 8 tools with the AnythingMCP Setup connector. Paying in Checkout could not be driven from the browser (no access to checkout.stripe.com); that leg is covered by the e2e test.