Install it with Homebrew on macOS, apt or yum on Linux, or Scoop on Windows, then run stripe version.
Stripe CLI install on macOS, Linux and Windows
Every build is roughly 10 to 12 MB, so the install is never the hard part, whether you're setting up a laptop or wiring the CLI into a workflow you've built with Activepieces.
zsh: command not found: stripe
That's the error you see when the install silently failed or the binary is off your PATH. The table shows Stripe's documented route per OS (docs checked 2026-12-06); take from it that all three end at the same verify command.
| OS | Documented install command | Package route | Verify |
|---|---|---|---|
| macOS | brew install stripe/stripe-cli/stripe |
Homebrew | stripe version |
| Linux | sudo apt install stripe or sudo yum install stripe, after adding Stripe's repository |
apt, yum, or tarball | stripe version |
| Windows | scoop install stripe, after adding Stripe's Scoop bucket |
Scoop, or zip | stripe version |
What the CLI is for
Production is not where this tool belongs. The CLI creates test objects, tails logs and forwards webhook events to localhost, and it's not a production API client.
Installing on macOS
On macOS, run the command from the table. According to Github, the Apple Silicon build is 10.5 MB and the Intel build is 11.6 MB, so neither is worth a bandwidth worry.
Installing on Linux
On Linux, the x86_64 tarball is 11.2 MB and ARM64 is 10.1 MB, so a CI runner or small container can pull either on every job without noticing.
Use the package route on a workstation, since upgrades then arrive with the system. Use the tarball when you can't add a repository, and put the binary on your PATH yourself.
Installing on Windows
On Windows, the x86_64 zip is 11.4 MB and the 32-bit i386 build is 10.9 MB. A 32-bit machine therefore saves under 1 MB and gains nothing else, so pick by architecture, not size.

With the zip, extract it and add its folder to PATH, or you'll hit the same "not found" error as above.
Verifying the install
To check the install, run stripe version in a new terminal. A version number back means the binary is on your PATH. Next comes signing in, which is where most of the real errors start.
This takes minutes, not a project: automate it in Activepieces free.
Stripe CLI login, API keys, and costs
When a command that worked last quarter suddenly fails, suspect the login first: the CLI signs in by pairing with your Stripe account in a browser, and that pairing expires, so most login errors come from stale credentials, not from bad commands.
Sign in with stripe login
- Run
stripe login. - Press Enter when prompted, which opens the browser.
- Confirm the pairing code in the terminal matches the one the browser shows.
- Click to allow access.
- Note the 90-day expiry, and run
stripe loginagain once it passes.

If a laptop that worked fine suddenly returns authentication errors, re-pair before you debug anything else.
Use an API key in scripts and CI
Because pairing needs a human, CI and scheduled jobs should skip it. Pass a key with the --api-key flag on a single command, or set the STRIPE_API_KEY environment variable for the whole job.

The environment variable keeps the key out of shell history and process listings, which the flag doesn't.
Use a restricted key scoped to what the job does, not your full secret key. If the job only reads events, a leaked restricted key can only read events.
Pricing: the CLI is free, API usage is not per call
Nobody bills you for installing or running the CLI as a product. What Stripe charges for is the payment activity behind your account, not each request the CLI makes. In test mode no real money moves, so testing costs you nothing in processing fees.
Nobody bills you for installing or running the CLI as a product. What Stripe charges for is the payment activity behind your account, not each request the CLI makes.
I haven't verified current rates against Stripe's pricing page, and the exact live-mode fees vary by country and payment method. Check that page for your region before you budget anything.
Rate limits in live and test mode
A script that loops happily in test mode can still hit throttling when pointed at live traffic. Stripe documents rate limits for its API, and live mode and test mode are limited separately, so the two environments don't behave identically.
I haven't verified the current numeric limits, so none appear here. Read them from Stripe's rate-limit documentation, and make any loop retry on a rate-limit response instead of assuming it can't happen.
The Stripe CLI commands used most, with examples
For most daily use, five commands are enough: customers create, listen, trigger, logs tail and events resend, and each leaves something working for the next. Run them in test mode so a single call, unlike a loop, can't hit a rate limit.
To make a first request, create a test customer:
stripe customers create --email="[email protected]"
If you get back a JSON customer object with a cus_ ID, your login and mode are right. If you get an auth error here, fix it now, because every later command reuses the same credentials.
Forward webhooks to localhost with stripe listen
stripe listen --forward-to localhost:4242/webhook
It prints a whsec_ signing secret. Use that one in your handler, not the dashboard's, or signature checks fail.
Filtering matters because resources fire many event types. Hookdeck's catalogue lists 17 for invoices, 14 for financial connections, and 13 each for charges and customers. Billing and payment intents have 8 each.
Narrow it with --events:
stripe listen --events invoice.paid,payment_intent.succeeded --forward-to localhost:4242/webhook
Fire test events with stripe trigger
stripe trigger payment_intent.succeeded
This creates the fixture objects and fires the event, so your listener has something to forward. Trigger the failure events too, because a handler that only ever sees the happy path hasn't been tested.
574 ms was all it took for a two-step flow, a Stripe payment-failed trigger feeding a Slack action that posts a message to a channel, to finish and report "Run succeeded", which is the end state a forwarded failure event should reach.

To inspect and replay events, use logs tail and events resend:
stripe logs tail
stripe events resend evt_123
logs tail streams API requests as they happen. events resend redelivers an event by ID, so you can rerun a handler after fixing a bug without recreating the payment.
When failures make no sense, suspect a stale login. stripe login writes credentials to config.toml under ~/.config/stripe, and a stale login there is a common cause of confusing failures.
To override it for one shell or a CI job, set STRIPE_API_KEY, or pass --api-key on a single command. Use a restricted key in either case, never your full secret key.

You can follow the rest of this with the builder open. Start free, no card.
Stripe CLI errors and solutions
Stale login, wrong mode, wrong secret: most Stripe CLI errors come down to one of these, and each has a short fix.
The table shows all seven by symptom, so match your terminal output to a row first and read the matching paragraph only if the fix isn't obvious.
| Symptom | Cause | Fix |
|---|---|---|
Invalid API Key provided |
Login expired, or a revoked or mistyped key | Run stripe login again, or pass a valid restricted key with --api-key |
| Object "not found" that you can see in the Dashboard | Test mode and live mode mismatch | Check which mode created the object, and add --live only when you mean it |
No signatures found matching the expected signature for payload |
Handler uses the wrong whsec_ secret, or the body was altered before verification |
Use the secret printed by stripe listen, and verify against the raw body |
connection refused |
Nothing is listening at the --forward-to address |
Start your server first, then check host, port and path |
command not found: stripe |
Binary is not on PATH |
Add the install directory to PATH and open a new shell |
| Payload fields differ from what your handler expects | Event and request API versions differ | Pin the version your code was written against |
429 Too Many Requests |
Too many requests in a short window | Retry with exponential backoff |
The paragraphs below cover the ones that need more than a line.
When a script that worked last quarter fails with an invalid key error today, the credential stripe login created has lapsed. Log in again. For anything unattended, skip the browser flow and pass a restricted key explicitly.
On test mode and live mode mismatches: the CLI works in test mode unless you ask otherwise.
A customer you created in the Dashboard's live view won't exist for a test-mode command, so you get "not found" for an object that plainly exists.
For webhook signature failures, note that stripe listen prints its own signing secret, and it differs from your Dashboard endpoint's secret. Paste the Dashboard one into a local handler and verification fails every time.
Body parsers that rewrite JSON before verification cause the same error, so hand the raw body to the library.
If you see connection refused, the forwarder works and your app doesn't: the server isn't running, or the port is wrong. "Command not found" means the shell can't see the binary at all.
When production returns a 429, the CLI is usually doing a job your application should own. Move the traffic into your own code, and retry with exponential backoff and jitter instead of looping at full speed.
Run the Stripe CLI in CI, or skip it with Activepieces
Run the CLI in CI with a restricted key passed through STRIPE_API_KEY, and don't use it to receive production webhooks; for event-driven jobs that need no code, the Activepieces Stripe integration, one of 751 integrations in its MIT-licensed open source monorepo, covers the same ground, so you're using a platform with broad adoption and support.

Use a restricted key in CI
If your pipeline log shows Invalid API Key provided: sk_live_***, someone has usually pasted a full secret key into a runner, and it either expired or was revoked.
A full key gives a build script the power to refund every charge you have. A restricted key limits what a leaked log line can do.
Follow the order, because the rotation step is what makes the rest safe:
- Create a restricted key in the Dashboard with access only to the resources the job touches.
- Store it as a secret in your CI provider, never in the repo or a config file.
- Expose it to the job as the
STRIPE_API_KEYenvironment variable. - Run the command, for example
stripe products list --limit 3. - Rotate the key when the job's scope changes or anyone with secret access leaves.
If step 4 returns a permissions error, the key is doing its job.
Production needs a webhook endpoint
When the runner exits, delivery stops, and nobody is told, because stripe listen forwards events to a local address only while the process runs.
Production needs a registered webhook endpoint at a public URL, and that endpoint has its own signing secret, separate from the one stripe listen prints.
Reuse the CLI's secret in production and every signature check fails, so your handler rejects genuine events as forged.
Automate Stripe without code
The CLI itself needs none of this, but the production end of the job doesn't have to be a pile of parts.
At Activepieces, the Stripe integration that starts a flow on a payment event, the agents and shared tables that act on it, the MCP tools and the approvals all live in one product, and the same role-based access, SSO, SCIM and audit logs cover every one of them, whether you self-host or use the cloud.
Assemble that span from point tools and you carry a webhook host, an automation vendor, an agent vendor and a log store, which means four roadmaps, four bills and four places to look when a signature check fails and you need to say what happened.
MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces in production.
Every Activepieces plan, the free one included, allows unlimited flows, so giving each Stripe event type its own flow costs nothing extra, and a run is 1 credit however many steps it has.
It won't replace the CLI for local debugging, where you still want to trigger and inspect events by hand.
It fits the jobs people were scripting the CLI to do in production: reacting to a payment, writing a row, notifying a channel. Build those as flows, keep the CLI for testing, and keep restricted keys in both.
Frequently asked questions
Where the CLI stops being a test tool and starts touching real accounts is what most of the remaining questions are about.
Is the Stripe CLI free to use? Yes. The tool is free and open source, and there's no CLI plan to buy.
Test-mode calls cost nothing. Live-mode calls are billed like any other API call, so a real charge made from your terminal carries the same processing fees as one made from your app.
Can the Stripe CLI move real money in live mode?
Yes, and that's the reason to be careful.
Passing the live flag, or using a live key, lets a command create real charges, refunds and payouts-related changes. stripe login stores a restricted key for your account, so what it can do depends on that key's permissions.
For anything beyond testing, pass a purpose-built restricted key with --api-key instead of leaning on the login. If a command shouldn't be able to refund, the key shouldn't be able to refund either.
How do I update or uninstall the Stripe CLI?
Use the package manager you installed it with. With Homebrew that's brew upgrade stripe to update and brew uninstall stripe to remove. Scoop on Windows and apt or a downloaded binary on Linux work the same way: update or remove through the same channel.
Uninstalling doesn't delete your saved login. Remove the config file too, or the credentials stay on disk, and run stripe logout first if you can.
Does the Stripe CLI work with Stripe Connect accounts? Yes. Add --stripe-account with the connected account's ID to make an API call on its behalf.
For events, stripe listen has --forward-connect-to, which sends events from connected accounts to a separate local URL. Keep that endpoint apart from your platform's own, because the two event streams carry different payloads and you'll want to handle them differently.
Why does stripe listen show a different secret each time?
Because the whsec_ secret it prints belongs to the CLI session, not to your Dashboard endpoint. It can change when you log in again, switch accounts or sandboxes, or run on another machine.
If your app verifies signatures with a stale value, you get signature verification failures. Run stripe listen --print-secret to read the current one, and set it in your local environment.
Never reuse the Dashboard endpoint's secret for local forwarding, or the other way round.
Related reading
Build it
Set this up in minutes.
No code required. Connect your accounts, and Activepieces runs it from there.
Start free Talk to sales

