Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
Security
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Quickstart
Stripe CLI
Listen to webhooks
Test and monitor your integration
Configure
Reference
Stripe for Visual Studio Code
Webhooks
File uploads
Error handling
Error codes
API
Keys
Libraries
Upgrades
Rate limits
Card testing
Expanding responses
Domains and IP addresses
Building With Stripe
Stripe's UI libraries
Extensions
Plugins
Samples
Checklist
HomeDeveloper tools

Stripe CLI

Build, test, and manage your Stripe integration right from the terminal.

The Stripe CLI is a developer tool to help you help build, test, and manage your integration with Stripe directly from your terminal. The Stripe CLI is easy to install, works on macOS, Windows, and Linux, and offers you a range of functionality to make your developer experience with Stripe better.


Want to see how the Stripe CLI works or help develop it? Check out the project on GitHub.

With the Stripe CLI, you can:

  • Securely test webhooks without relying on third-party tunneling software
  • Trigger webhook events to easily test your integration
  • Receive API request logs locally
  • Create, retrieve, update, and delete API objects

Follow the steps below to get started with the Stripe CLI.

Step 1: Install the Stripe CLI

macOS Linux Windows Docker
homebrew manual

To install the Stripe CLI with homebrew, run:

Terminal
brew install stripe/stripe-cli/stripe
brew install stripe/stripe-cli/stripe

To install the Stripe CLI on macOS without homebrew:

  1. Download the latest mac-os tar.gz file from https://github.com/stripe/stripe-cli/releases/latest
  2. Unzip the file: tar -xvf stripe_X.X.X_mac-os_x86_64.tar.gz

Optionally, install the binary in a location where you can execute it globally (e.g., /usr/local/bin).

apt-get yum manual

To install the Stripe CLI on Debian and Ubuntu-based distributions:

  1. Add Bintray’s GPG key to the apt sources keyring:
Terminal
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 379CE192D401AB61
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 379CE192D401AB61
  1. Add stripe-cli’s apt repository to the apt sources list:
Terminal
echo "deb https://dl.bintray.com/stripe/stripe-cli-deb stable main" | sudo tee -a /etc/apt/sources.list
echo "deb https://dl.bintray.com/stripe/stripe-cli-deb stable main" | sudo tee -a /etc/apt/sources.list
  1. Update the package list:
Terminal
sudo apt-get update
sudo apt-get update
  1. Install the CLI:
Terminal
sudo apt-get install stripe
sudo apt-get install stripe

To install the Stripe CLI on RedHat and CentOS-based distributions:

  1. Add stripe-cli’s yum repository to the yum sources list:
Terminal
wget https://bintray.com/stripe/stripe-cli-rpm/rpm -O bintray-stripe-stripe-cli-rpm.repo && sudo mv bintray-stripe-stripe-cli-rpm.repo /etc/yum.repos.d/
wget https://bintray.com/stripe/stripe-cli-rpm/rpm -O bintray-stripe-stripe-cli-rpm.repo && sudo mv bintray-stripe-stripe-cli-rpm.repo /etc/yum.repos.d/
  1. Install the CLI:
Terminal
sudo yum install stripe
sudo yum install stripe

To install the Stripe CLI on Linux without a package manager:

  1. Download the latest linux tar.gz file from https://github.com/stripe/stripe-cli/releases/latest
  2. Unzip the file: tar -xvf stripe_X.X.X_linux_x86_64.tar.gz
  3. Run the executable: ./stripe
Scoop manual

To install the Stripe CLI with Scoop, run:

Terminal
scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
Terminal
scoop install stripe
scoop install stripe

To install the Stripe CLI on Windows without Scoop, run:

  1. Download the latest windows tar.gz file from https://github.com/stripe/stripe-cli/releases/latest
  2. Unzip the stripe_X.X.X_windows_x86_64.zip file
  3. Run the unzipped .exe file

The Stripe CLI is also available as a Docker image. To install the latest version, run:

Terminal
docker run --rm -it stripe/stripe-cli:latest
docker run --rm -it stripe/stripe-cli:latest

Step 2: Login with your Stripe account

After installing the Stripe CLI, you must pair it with your Stripe account. To do so, run stripe login in the terminal. You’ll be prompted to launch your browser and login to the Stripe Dashboard to grant the Stripe CLI access to your account.

Terminal
stripe login
stripe login
Output
Your pairing code is: humour-nifty-finer-magic Press Enter to open up the browser (^C to quit)
Your pairing code is: humour-nifty-finer-magic Press Enter to open up the browser (^C to quit)

Pairing generates a pair of secret API keys—one test mode, one live mode—that are valid for 90 days. You can also manually delete the key under API Keys in the Dashboard (e.g., when you’re done using the Stripe CLI). If you’re in an environment that doesn’t have a browser, a URL will be printed to use outside of that environment.

Step 3: Run your first command

You are now ready to use the Stripe CLI, and to get started you can run your first command to create a customer by running:

Terminal
stripe customers create
stripe customers create

This command creates a new customer on Stripe and returns the raw Customer object as JSON.

Next steps

To see what else you can do with the Stripe CLI, use the following guides or run the stripe --help command to see what’s possible.

  • Listen to webhooks events
  • Test and monitor your integration
  • Configure the Stripe CLI
  • Stripe CLI Reference
Was this page helpful?
Questions? Contact us.
Developer tutorials on YouTube.
You can unsubscribe at any time. Read our privacy policy.
On this page
Install the Stripe CLI
Login with your Stripe account
Run your first command
Next steps