CLI Checkout for Agents
Buy AI credits or upgrade hosted MCP from a terminal with one waitable checkout command.
Use this guide when an agent, CI runner, or terminal-only operator needs to pay for MCP Stack without using the dashboard.
--non-interactive --wait --json.Normal hosted checkout does not need a separate sync command. The CLI waits for server-side billing state before it exits.
mcpstack billing credits checkout --amount 25 --non-interactive --wait --jsonThe command prints the Stripe Checkout URL immediately, keeps polling while payment is completed, and exits with the refreshed billing status. Treat the checkout as successful when the final JSON reports a completed checkout and the organization balance is updated.
Check the ledger after payment when you need an audit trail:
mcpstack billing credits ledger --jsonmcpstack billing checkout --plan mcp_hosting_team --non-interactive --wait --jsonComplete the printed Stripe Checkout URL while the command waits. Treat the plan checkout as successful when the final JSON shows the selected hosted plan and an active subscription.
mcpstack auth login --no-browser
mcpstack auth whoami --json
mcpstack billing status --json
mcpstack billing credits checkout --amount 25 --non-interactive --wait --json
mcpstack billing checkout --plan mcp_hosting_team --non-interactive --wait --json
mcpstack billing status --jsonUse auth login --no-browser for the first human-assisted login. For repeated automation, use a service-account key and MCPSTACK_ORG_ID.
The one-command form above is the recommended path. Only split checkout and waiting when your runner cannot keep the CLI process alive while Stripe is completed:
mcpstack billing credits checkout --amount 25 --non-interactive --json
# Complete the printed Stripe Checkout URL.
mcpstack billing wait cs_... --product ai-credits --jsonUse the same pattern for hosted plan checkout with --product hosted-plan.
Agents should run billing ... checkout --non-interactive --wait --json, complete the printed Stripe URL, and trust the final JSON from that same command. Use billing wait only for split-process runners.