feat(apollo): dashboard-authed payments endpoints (checkout + billing portal)
loading diff…
The public /api/v3/payments/{session,manage-subscription} routes use getAuthRouter() + API_AUTH.COOKIE. After the WorkOS AuthKit migration killed the browser cookie, the dashboard's calls 401 (Auth_NoAuthProvided) — "Please use valid API key" on Get Started and Manage Billing. Same root cause and fix as the already-merged connected-accounts / projects / org / team-members migration.
New dashboard-authed duplicates under /api/internal-dashboard/payments/:
| File | Stripe action |
|---|---|
payments/session.ts | checkout session |
payments/manage-subscription.ts | billing portal session |
getDashboardRouter() + getDashboardOrgAuthInfo(c) (reads x-org-id) → org + member email from verified dashboard membership, exactly like org/api_key/regenerate.role !== UserRole.ADMIN → 403).origin, so success/cancel/return URLs come from the request body. manage-subscription gains an optional return_url; both fall back to the dashboard FE URL.composio_dashboard PR (tRPC payments router + UI repoint).
🤖 Generated with Claude Code