调至内容部分
创建账户
或
登录
Stripe 文档徽标
/
询问人工智能
创建账户
登录
开始
付款
销售收入
平台和交易市场
资金管理
开发人员资源
概览
版本管理
更改日志
升级您的 API 版本
升级 SDK 版本
基础功能
SDK
API
测试
Stripe CLI
    概览
    Install the CLI
    Use the CLI
    Enable autocompletion
    CLI 密钥
    触发事件
    Upgrade the CLI
项目示例
工具
Workbench
开发人员管理平台
Stripe Shell
Stripe for Visual Studio Code
功能
工作流程
事件接收端
Stripe 健康警报文件上传
AI 解决方案
代理工具包
模型上下文协议
安全与隐私
安全
Stripebot web crawler
隐私
扩展 Stripe
构建 Stripe 应用程序
使用 Stripe 的应用程序
合作伙伴
合作伙伴生态
合作伙伴认证
首页开发人员资源Stripe CLI

注意

该页尚未提供此语言版本。我们正在加紧将我们的文档翻译成更多语言,很快将为您提供译文。

Install the Stripe CLI

Install the Stripe CLI on macOS, Windows, or Linux.

The Stripe CLI lets you build, test, and manage your integration from the command line. You can use the Stripe CLI to:

  • Create, retrieve, update, or delete any of your Stripe resources in a sandbox.
  • 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. 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
  2. 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)

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 is helpful when authenticating to the CLI without a browser, such as in a CI/CD pipeline.

Command Line
stripe login --interactive

You can also 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 the different ways you can use the Stripe CLI. It covers how to configure the CLI, download sample code, and work with Stripe objects.

正在加载视频内容...
此页面的内容有帮助吗?
是否
  • 需要帮助?联系支持。
  • 加入我们的早期使用计划。
  • 查看我们的更改日志。
  • 有问题?联系销售。
  • LLM? Read llms.txt.
  • Powered by Markdoc