Get a checkout link
Returns a Stripe Checkout URL for the key owner. Give it to the user to open and pay. When the user already pays, returns a billing portal URL with portal: true for switching plans.
POST
/api/cli/billing/checkoutAuthorization
AuthorizationBearer token (ba_sk_...) · headerrequiredAPI key from /dashboard/api-keys. Keys expire after 365 days.
or
AuthorizationBearer token (ba_mcp_access_...) · headerrequiredThe OAuth access token the hosted MCP server issues (brainy:read for GET routes, brainy:write for everything else). One login serves MCP, the CLI and the desktop app. A token without the needed scope gets 403 Insufficient scope.
Request body
requiredapplication/jsonplanstringrequiredAllowed:
creatorproResponses
200
OK
urlstring<uri>requiredportalbooleanrequired400
INVALID_PLAN
errorstringrequiredcodestring401
Missing, invalid, expired, or revoked API key
errorstringrequiredcodestring404
BILLING_DISABLED: paid plans are not open
errorstringrequiredcodestring503
PLAN_UNAVAILABLE
errorstringrequiredcodestring