Authentication and billing troubleshooting
Diagnose sign-in redirects, organization access, Stripe checkout, and billing portal errors.
Sign-in returns to the wrong page#
Protected routes preserve a redirect_url when sending a signed-out visitor to Sign in. After signing in, confirm the destination belongs to the organization you selected.
If the redirect loops:
- Clear only the site’s cookies and retry.
- Confirm the browser allows the Clerk authentication flow.
- Ask an operator to verify the Clerk publishable key, secret key, sign-in URL, and allowed origins.
- Record the route and UTC time without including cookies or tokens.
The API returns 401#
A protected API request needs a valid Clerk bearer token. Sign out and back in. Developers should confirm the request uses the shared authenticated fetch helper and that the deployed Clerk JWKS is reachable.
The wrong organization’s data appears empty#
Data is scoped by Clerk organization ID. Select the intended organization in Clerk, then reload the dashboard. A new organization can legitimately have no integration or runs.
Checkout says the plan is not configured#
The API requires STRIPE_PRICE_ID_PRO or STRIPE_PRICE_ID_TEAM for the requested plan. An operator must configure the missing price ID; users should not retry with a different plan merely to bypass the error.
The billing portal says no account was found#
The portal requires a stored Stripe customer ID. Confirm checkout completed and that the signed Stripe webhook updated the organization’s subscription row.
A payment is past due#
Open Settings → Billing and use Manage billing & invoices. Customer communications, grace periods, retries, and access changes for past_due subscriptions are not defined in repository behavior and need product-owner verification.