Connect Stripe
Connect payments in the dashboard before you can publish a product.
Connect payments in the dashboard before you can publish a product.
Farther Shore charges your customers through your own Stripe account —
subscriptions, metered usage, and prepaid credits all settle there. Connecting
Stripe is a publish precondition: a product with @Plan pricing cannot go
live until Stripe is connected and verified. This one step is dashboard-only
— it is the single piece of setup an agent cannot do over the CLI or MCP, by
design (OAuth + identity verification happen in the browser). Everything else —
authoring plans, publishing, migrating subscribers — is fully scriptable.
That's the whole flow. There is no API or CLI command for it — see the handoff below.
Stripe Tax is connected the same way, on the same Connections page. If your plans require tax collection, enable Stripe Tax there before publishing.
Connecting Stripe is an interactive OAuth + KYC flow that must run in a browser
under a human, so the platform does not expose a connect endpoint to maker
tokens or cli_access. Instead, any billing-gated operation fails fast with a
clear code and points you back to the dashboard. An agent's correct move is to
stop and hand off — surface the dashboard Connections URL to the user and
wait, rather than retry.
When you (or an agent) run farthershore product publish before Stripe is
connected, the CLI exits non-zero with one of these codes and a one-line
remediation:
STRIPE_NOT_CONNECTED
Publishing requires a connected Stripe account. Connect one on the dashboard
Connections page, then re-run `farthershore product publish`.
STRIPE_NOT_VERIFIED
Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then
re-run `farthershore product publish`.
STRIPE_NOT_CONFIGURED
Stripe isn't connected on this product. Connect it in the dashboard before
running billing operations.
BILLING_TAX_NOT_ENROLLED
Stripe Tax isn't enrolled for this account. Enable it from the dashboard
Connections page, then re-run `farthershore product publish`.
# Publish blocks until Stripe is connected + verified.
farthershore product publish croncloud
# → exit 1, code STRIPE_NOT_CONNECTED — connect Stripe in the dashboard, then re-run.
Do not script around these codes. They are terminal for the CLI: the fix is a human connecting Stripe in the dashboard, not a retry. An agent should report the blocking code and the Connections URL, then pause.
Once Stripe is connected and the product is published, your customers' payment flows are handled for you by the platform and the Frontend SDK — your frontend never touches Stripe keys:
fs.plans.subscribe({ compiledPlanId })
returns a Checkout url for paid plans; the managed <PlansTable/> component
wires this with zero props.fs.billing.openBillingPortal() returns a portal url. The managed
<BillingSummary/> component exposes it.import { createFartherShoreClient } from "@farthershore/farthershore-js";
const fs = createFartherShoreClient({ coreUrl: "https://core.farthershore.com" });
const { plans } = await fs.bootstrap();
// Paid plan → Stripe Checkout URL the browser redirects to.
const { url } = await fs.plans.subscribe({ compiledPlanId: plans[0]!.id });
if (url) window.location.assign(url);
If the customer-facing app calls a billing endpoint before Stripe is configured,
the Frontend SDK throws FartherShoreBillingNotConfiguredError (wire code
BILLING_NOT_CONFIGURED); branch on it with isBillingNotConfigured(err) and
route the user to the billing portal or a "not yet available" state.