Stripe CLI
$ stripe Official High RiskStripe CLI lets developers and coding agents trigger test webhook events, tail API logs, and call Stripe REST resources from the terminal. Test mode is separated from --live mode, helping protect real financial data during agent-driven development.
brew install stripe/stripe-cli/stripe Stripe CLI excels at local webhook forwarding (stripe listen) and test fixture triggers (stripe trigger); Stripe's official MCP is convenient for read-only billing lookups.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Outputs clean JSON for API resource commands and supports non-interactive flags, though listen and logs tail are long-lived streaming commands.
- API resource commands output JSON directly to stdout
stripe listenstreams indefinitely unless bounded by timeout
Defaults to Stripe Test Mode and requires an explicit --live flag for production, providing a strong built-in safety boundary for financial APIs.
- Test mode default with explicit
--liveopt-in - Supports restricted API keys via
--api-key
Single Go binary with Homebrew, Docker, Scoop, and apt/yum packages.
- Official Homebrew tap and cross-platform releases
Unmatched for local webhook testing and fixture simulation during payment integration.
stripe listenandstripe triggersolve local webhook testing
Official Stripe tool (stripe/stripe-cli) actively maintained under Apache-2.0.
- Official Stripe GitHub repository
Thorough Stripe Docs covering CLI commands, webhooks, and fixtures.
- Official docs at docs.stripe.com/stripe-cli
Security, Auth & Guardrails
Stores restricted session keys in ~/.config/stripe/config.toml or accepts --api-key / STRIPE_API_KEY.
CLI is free (Apache-2.0); Stripe sandbox/test mode has no transaction fees.
# Stripe CLI Agent Rules - Stay strictly in Test Mode; NEVER pass `--live` or live `sk_live_` keys in autonomous runs. - Prefer `stripe trigger` and `stripe listen` for integration verification. - Require explicit human approval before creating refunds, payouts, or live customers.
Agent-Ready Command Recipes
Safe Read-Only Queries
stripe payment_intents list --limit 5
Defaults to test mode and returns structured JSON resource objects.
stripe trigger payment_intent.succeeded
Safely simulates a webhook payload in Stripe test mode.
Controlled Writes & Previews
stripe listen --forward-to localhost:4242/webhook
Streams test webhook events to a local endpoint without modifying live billing.
Strengths for Agents
- + Safe-by-default Test Mode separation prevents accidental live billing mutations unless
--liveis passed. - + API subcommands return clean JSON matching Stripe's REST schemas.
- + Local webhook forwarding (
stripe listen) andstripe triggerare essential for coding agents building payment flows.
Caveats & Pitfalls
- ! Streaming commands like
stripe listenwill block forever if an agent runs them synchronously without backgrounding. - ! Lacks a generic
--dry-runflag on write API calls.