Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
    Overview
    Get started
    Autocompletion
    CLI keys
    Trigger events
    Upgrade
    Reference
Stripe Shell
Developers Dashboard
Agent toolkit
Stripe health alertsBuilding with LLMsStripe for Visual Studio CodeFile uploads
Security
Security
Extend Stripe
Stripe Apps
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe CLI

Get started with the Stripe CLI

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

Copy page

The Stripe CLI is a developer tool to help you build, test, and manage your integration with Stripe directly from the command line. It 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 a sandbox (for example, create a product)
  • Stream real-time API requests and events happening in your account
  • Trigger events to test your webhooks integration

View the full CLI reference.

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. Log in 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

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. (Optional) 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 is helpful when authenticating to the CLI without a browser, such as in a CI/CD pipeline.
Command Line
stripe login --interactive
  1. (Optional) 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_BQokikJOvBiI2HlWgH4olfQ2

Get started with a video

Watch this video to learn different ways to use the Stripe CLI. It covers how to configure the CLI, download sample code, and work with Stripe objects.

Loading video content...

Next steps

  • Stream real-time events with the Stripe CLI
  • View the full CLI reference
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc