
Stripe CLI
CLIStripe 官方命令行:在本地转发与触发 webhook 事件、实时查看 API 请求日志、增删改查 Stripe 对象,便于调试支付集成。需 Stripe 账号并执行 stripe login。
Stripe CLI
The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal.
With the CLI, you can:
- Securely test webhooks without relying on 3rd party software
- Trigger webhook events or resend events for easy testing
- Tail your API request logs in real-time
- Create, retrieve, update, or delete API objects.

Installation
Stripe CLI is available for macOS, Windows, and Linux for distros like Ubuntu, Debian, RedHat and CentOS.
npm (macOS, Linux, Windows)
If you have Node.js >= 18 installed, you can install via npm:
npm install -g @stripe/cli
You can also directly execute commands via npx, although this won't add stripe to your PATH:
npx @stripe/cli login
macOS
Homebrew:
brew install stripe
Linux
apt (Debian, Ubuntu):
curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
sudo apt update
sudo apt install stripe
yum/dnf (RedHat, Fedora, CentOS):
echo -e "[Stripe]\nname=stripe\nbaseurl=https://packages.stripe.dev/stripe-cli-rpm-local/\nenabled=1\ngpgcheck=0" | sudo tee -a /etc/yum.repos.d/stripe.repo
sudo yum install stripe
Windows
WinGet:
winget install Stripe.StripeCLI
Scoop:
scoop bucket add stripe https://github.com/stripe/scoop-stripe-cli.git
scoop install stripe
Docker
The CLI is also available as a Docker image: stripe/stripe-cli.
docker run --rm -it stripe/stripe-cli version
stripe version x.y.z (beta)
Password Store Setup with Docker
While test mode doesn’t require password store, you will need to set it up if you wish to perform live mode requests.
You can also make live mode requests on a per command basis by attaching the
--api-keyflag.
- Create
entrypoint.sh
#!/bin/sh
if ! [ -f ~/.gnupg/trustdb.gpg ] ; then
chmod 700 ~/.gnupg/
gpg --quick-generate-key stripe-live # This will generate a gpg key called "stripe-live"
fi
if ! [ -f ~/.password-store/.gpg-id ] ; then
pass init stripe-live # This will initialize a password store record named "stripe-live", using the gpg key above
pass insert stripe-live # This will insert value for the password store "stripe-live", which we will put Stripe Live Secret Key in
fi
string="$@"
liveflag="--live"
if [ -z "${string##*$liveflag*}" ] ;then
OPTS="--api-key $(pass show stripe-live)" # This will use the content of the password store "stripe-live" which was inserted in line 8
fi
#pass insert stripe-live
/bin/stripe $@ $OPTS
- Create a docker file
Dockerfile-cli
FROM stripe/stripe-cli:vx.x.x
RUN apk add pass gpg-agent
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
- Build the docker image
docker build -t stripe-cli -f Dockerfile-cli .
- Run the docker image with password volumes, replacing
$commandwith the appropraite Stripe CLI command (i.ecustomers list)
docker run --rm -it -v stripe-config://root/.config/stripe/ -v stripe-gpg://root/.gnupg/ -v stripe-pass://root/.password-store/ stripe-cli $command
For live mode requests append
--liveafter$command.
Without package managers
Download the latest release for your platform from the GitHub Releases page.
macOS:
tar -xvf stripe_X.X.X_mac-os_ARCH.tar.gz
Optionally move the stripe binary to /usr/local/bin for global access.
Linux:
tar -xvf stripe_X.X.X_linux_x86_64.tar.gz
Move the stripe binary to a directory on your PATH.
Windows:
Unzip stripe_X.X.X_windows_x86_64.zip and add the path containing stripe.exe to your Path environment variable.
Note: Anti-virus software may flag the binary as unsafe. This is a false positive; see issue #692 for details.
Upgrading
npm (macOS, Linux, Windows)
npm install -g @stripe/cli
macOS
Homebrew:
brew upgrade stripe
Linux
apt (Debian, Ubuntu):
sudo apt update && sudo apt upgrade stripe
yum/dnf (RedHat, Fedora, CentOS):
yum update stripe
Windows
WinGet:
winget upgrade Stripe.StripeCLI
Scoop:
scoop update stripe
Docker
docker pull stripe/stripe-cli:latest
Because Docker containers are ephemeral, the stripe login command isn't supported. Use the --api-key flag instead.
Without package managers
Download the latest release for your platform from the GitHub Releases page and replace your existing binary.
Uninstalling
1. Remove your plugins
Package managers only remove the stripe binary; they leave installed plugins behind. Remove plugins first, while the stripe binary is still available:
stripe plugin uninstall --all
2. Remove the CLI
npm (macOS, Linux, Windows):
npm uninstall -g @stripe/cli
Homebrew (macOS):
brew uninstall stripe
apt (Debian, Ubuntu):
sudo apt remove stripe
yum/dnf (RedHat, Fedora, CentOS):
sudo yum remove stripe
WinGet (Windows):
winget uninstall Stripe.StripeCLI
Scoop (Windows):
scoop uninstall stripe
Docker:
docker rmi stripe/stripe-cli
Without package managers:
Delete the stripe binary you downloaded.
3. Optionally remove configuration and credentials
Uninstalling the CLI intentionally keeps your configuration, so reinstalling preserves your projects and settings. It is only removed if you remove it yourself:
# Clear stored credentials for every project you are logged into
stripe logout --all
# Remove all remaining CLI configuration
rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}/stripe"
Usage
Installing the CLI provides access to the stripe command.
stripe [command]
# Run `--help` for detailed information about CLI commands
stripe [command] help
Commands
The Stripe CLI supports a broad range of commands. Below are some of the most used ones:
loginlistentriggerlogs tailevents resendconfigopenget,post&deletecommandsresourcecommands
Documentation
For a full reference, see the CLI reference site
Telemetry
The Stripe CLI includes a telemetry feature that collects some usage data. See our telemetry reference for details.
Feedback
Got feedback for us? Please don't hesitate to tell us on feedback.
Contributing
See CONTRIBUTING.md for details on developing the Stripe CLI. All contributions are governed by the code of conduct.
License
Copyright (c) Stripe. All rights reserved.
Licensed under the Apache License 2.0 license.
相关资源

Stripe
PluginStripe 官方插件:内置 Stripe 远程 MCP,带集成最佳实践、Connect、Stripe Apps 与 API 版本升级等技能,还有报错解释和测试卡号命令,帮 agent 正确完成支付集成。已收录在 Claude 和 Codex 的官方市场。
stripe/ai2k
Stripe Agent Skills
SkillStripe 官方技能合集:支付集成最佳实践、SDK 与 API 版本升级、Connect 平台接入、文档查询等,内容从 Stripe 文档自动同步。
stripe/ai2k
Stripe Best Practices
Skill指导 Stripe 集成决策:Checkout 与 PaymentIntents 选型、Connect、订阅计费、税务、Webhook 与密钥安全,并提示避开已废弃的 API。Stripe 官方维护。
stripe/ai2k
Stripe MCP
MCP让 agent 调用 Stripe API 管理客户、支付、订阅、发票与退款,并检索 Stripe 文档与支持文章。Stripe 官方维护,远程服务通过 OAuth 授权,也可用密钥经 npx 本地运行。
stripe/ai2k
微信支付 Skills
Skill微信支付官方技能:按业务场景推荐支付产品,给出官方示例代码与接口文档,上线前检查签名、回调验签、幂等等接入隐患,并按错误码排障。
wechatpay-apiv3/wechatpay-skills364
Postman MCP Server
MCPPostman 官方 MCP 服务器:让 agent 管理工作区、集合、环境与 API 规范,辅助接口测试,并按 API 定义生成客户端代码。远程版用 OAuth 登录,本地版需要 Postman API Key。
postmanlabs/postman-mcp-server321