Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
No-code
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Overview
Developer tools
    Get started
    Quickstarts
    Stripe Shell
    Stripe CLI
      Get started
      Autocompletion
      CLI keys
      Upgrade
      Reference
    Dashboard
    Stripe for Visual Studio Code
    Webhooks
    File uploads
    Error handling
    Security at Stripe
    API
    API keys
    Upgrades
    Changelog
    Rate limits
    Data Availability
    Expanding responses
    Domains and IP addresses
    Search
    Building With Stripe
    Prebuilt iOS UI
    Prebuilt Android UI
    Extensions
    Samples
    Checklist
    Feedback
SDKs
Sample projects
Videos
Stripe Apps
Stripe Connectors
Partners
HomeDeveloper toolsStripe CLI

Get started with the Stripe CLI

Build, test, and manage your Stripe integration directly from the command line.

The Stripe CLI is a developer tool to help you build, test, and manage your integration with Stripe directly from the command line. It’s simple to install, works on macOS, Windows, and Linux, and offers a range of functionality to enhance your developer experience with Stripe. You can use the Stripe CLI to:

  • Create, retrieve, update, or delete any of your Stripe resources in test mode (for example, create a product)
  • Stream real-time API requests and events happening in your account
  • Trigger events to test your webhooks integration

Install the Stripe CLI

From the command-line, use an install script or download and extract a versioned archive file for your operating system to install the CLI.

To install the Stripe CLI with homebrew, run:

Command Line
brew install stripe/stripe-cli/stripe

Log in to the CLI

  1. Login and authenticate your Stripe user Account to generate a set of restricted keys. To learn more, see Stripe CLI keys and permissions.
Command Line
stripe login
  1. Press the Enter key on your keyboard to complete the authentication process in your browser.
Output
Your pairing code is: enjoy-enough-outwit-win This pairing code verifies your authentication with Stripe. Press Enter to open the browser or visit https://dashboard.stripe.com/stripecli/confirm_auth?t=THQdJfL3x12udFkNorJL8OF1iFlN8Az1 (^C to quit)
  1. Optionally, if you don’t want to use a browser, use the --interactive flag to authenticate with an existing API secret key or restricted key. This can be helpful when authenticating to the CLI without a browser, such as in a CI/CD pipeline.
Command Line
stripe login --interactive
  1. Optionally, use the --api-key flag to specify your API secret key inline each time you send a request.
Command Line
stripe login --api-key
sk_test_4eC39HqLyjWDarjtT1zdp7dc

Get started with a video

Watch this video to learn different ways to use the Stripe CLI. It covers how to configure the CLI for a CI/CD pipeline, specify a secret key as an environment variable, and setup a local server with a Stripe sample.

Loading video content

Next steps

  • Stream real-time events with the Stripe CLI
Was this page helpful?
Questions? Contact Sales.
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Install the Stripe CLI
Log in to the CLI
Get started with a video
See also
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to your Stripe account and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g. )
The Stripe Shell is best experienced on desktop.
$