Building and testing a Stripe integration can require frequent switching between the terminal, your code editor, and the Dashboard. Today, we’re excited to launch the Stripe command-line interface (CLI). It lets you interact with Stripe right from the terminal and makes it easier to build, test, and manage your integration.
To start, the CLI will let you test webhooks, tail real-time API logs, and create or update API objects. Here’s a preview of some of the features:
Stripe sends a variety of webhooks, which let you listen and respond to specific events programmatically. Run with the CLI to forward webhooks to your local web server during development—no third-party tunneling tools required. You can also trigger and test specific webhook events with .
While integrating, it can be useful to look at logs to fix any issues. You can now use to stream API request logs in real time in the terminal in addition to viewing these logs from the Dashboard. Quickly inspect parameters or JSON responses and debug errors as they happen.
You can now create, retrieve, update, or delete any Stripe object directly from the CLI in both test and live mode. For example, you can use and specify parameters for properties inline.
Since you can pipe results into other commands, this can be a simple and powerful way to automate tasks. Here’s an example:
The above command uses the CLI to list live subscriptions that are past due, pipes the JSON response to to extract the customer name and email, and exports the data in CSV format.
To see a full list of supported commands, run or visit the docs to learn more.
The Stripe CLI natively supports macOS, Windows, and Linux. You can also pull our Docker image to use in automated testing or a continuous integration setup.
We’re just getting started and we’ll be adding a lot more features to the CLI. If you have feedback or feature requests, join the conversation on GitHub. You can also run to share your ideas for which use cases we should tackle next.