Stripe CLI
1.9k stars
official open-source Has MCP macOS Linux Windows Cross-platform Actively maintained
Stripe's official command-line tool. Build, test, and manage payment integrations with webhook forwarding, event triggering, and real-time API log tailing from the terminal.
Stripe CLI has both a CLI and an MCP server. See when to use each
When to use
Stripe CLI is essential for any developer building or maintaining Stripe payment integrations. The headline feature is local webhook testing — stripe listen forwards events from Stripe directly to your localhost, eliminating the need for ngrok or other tunneling services. This alone saves significant setup time and removes a common pain point in payment development.The trigger command creates realistic test events on demand. Instead of manually creating payment intents, subscriptions, or invoices through the dashboard to generate webhooks, you fire a single command. Combined with listen, this creates a tight development loop: trigger an event, watch it hit your local handler, debug the response, iterate. No browser tabs, no manual clicking.Real-time log tailing with stripe logs tail gives you instant visibility into API requests hitting your Stripe account. Filter by status code to catch 400s and 500s as they happen. This is faster than checking the dashboard logs page and works naturally in a terminal-centric workflow alongside your editor and test runner.The CLI also provides direct API resource management. Create customers, list subscriptions, retrieve payment intents — all from the command line. For scripting and automation, this is far more efficient than writing throwaway scripts using the Stripe SDK. Combined with Stripe's official MCP server, AI coding agents can interact with the Stripe API programmatically during development.If you accept payments through Stripe, install this CLI. It pays for itself on the first webhook debugging session.
When to skip
Skip the Stripe CLI if you do not use Stripe for payments. This tool is purpose-built for the Stripe platform — it authenticates against the Stripe API and has zero utility with other payment processors like PayPal, Square, Adyen, or Braintree. If you use a different payment provider, look for their specific CLI tools or API testing approaches.If your role does not involve writing or debugging payment integration code, the CLI will not be useful. Product managers, designers, and non-technical team members who need to view payment data should use the Stripe Dashboard instead. The dashboard provides charts, search, and export features that the CLI does not replicate.For production monitoring and alerting, the CLI is not the right tool. stripe logs tail is a development-time utility, not a production observability solution. Use Stripe's built-in webhook retry logic, dashboard event logs, or integrate with a monitoring platform like Sentry or Datadog for production payment monitoring.If you only interact with Stripe through a pre-built integration (like a Shopify or WooCommerce plugin) and never write custom payment code, you will not benefit from the CLI. The tool is designed for developers writing server-side webhook handlers, creating custom checkout flows, or building subscription billing logic.Similarly, if your team relies exclusively on the Stripe Dashboard for all payment operations and has no terminal-based workflow, adopting the CLI may not change established habits enough to justify the learning investment.
Key Commands
stripe listen Forward webhook events to a local endpoint for development testing
stripe trigger Trigger a specific webhook event for testing without real transactions
stripe logs tail Tail API request logs in real time from your Stripe account
stripe events resend Resend a previously delivered webhook event for debugging
stripe login Authenticate the CLI with your Stripe account via browser
stripe resources Interact with Stripe API resources directly from the terminal
stripe samples Clone and bootstrap Stripe sample integration projects
GitHub Stats
repo stripe/stripe-cli
stars 1.9k
language Go
license Apache-2.0
last commit Mar 11, 2026
Alternatives
| tool | description |
|---|---|
| Stripe CLI | current tool |
| Stripe Dashboard | Stripe's web-based interface for managing payments, viewing logs, and configuring webhooks. Provides visual tools the CLI does not replicate. |
| Mollie CLI | Command-line interface for the Mollie payment API. Targets a different payment platform but fills a similar CLI-for-payments niche. |
FAQ
- Is the Stripe CLI free?
- Yes. The Stripe CLI is free and open-source under the Apache 2.0 license. It works with all Stripe accounts including free test-mode accounts. Stripe's platform charges transaction fees on live payments, but the CLI itself costs nothing to install and use.
- How do you test webhooks locally with the Stripe CLI?
- Run stripe listen --forward-to localhost:3000/webhooks to forward events to your local server. The CLI creates a temporary webhook endpoint on Stripe's side and tunnels events to your machine. Use stripe trigger to fire specific events like payment_intent.succeeded. No ngrok or external tunneling required.
- Can AI coding agents use the Stripe CLI?
- Yes. Stripe provides an official MCP server (@stripe/mcp on npm) that exposes Stripe API operations and documentation search to AI agents. The CLI itself can be invoked by any agent that can run shell commands. Stripe also detects AI agent environments and appends agent info to API request headers.
- What is the difference between stripe listen and stripe trigger?
- stripe listen opens a persistent connection that forwards incoming webhook events to a local URL. stripe trigger creates specific test events on demand. Use them together — run listen in one terminal to receive events, then run trigger in another to generate them. This creates a complete local webhook testing loop.
Last verified: Mar 14, 2026