Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
Stripe CLI
    Overview
    Install the CLI
    Use the CLI
    Enable autocompletion
    CLI keys
    Trigger events
    Upgrade the CLI
Sample projects
Tools
Workbench
Developers Dashboard
Stripe Shell
Stripe for Visual Studio Code
Features
Workflows
Event destinations
Stripe health alertsFile uploads
AI solutions
Agent toolkit
Model Context Protocol
Security and privacy
Security
Stripebot web crawler
Privacy
Extend Stripe
Build Stripe apps
Use apps from Stripe
Partners
Partner ecosystem
Partner certification
HomeDeveloper resourcesStripe CLI

Stripe CLI keys and permissions

Learn about default Stripe CLI keys and permissions.

By default, you can use your account’s secret keys to perform any API request without restriction. When you run the stripe login command to authenticate to the Stripe CLI, the CLI generates a set of restricted keys for your account (one for a sandbox, one in live mode) that are valid for 90 days.

Restricted keys

Unlike an API secret key, a restricted key generated by the Stripe CLI has restrictions on the API requests that it can perform. You can create new restricted keys in the Dashboard with different restrictions, or specify any API key using the --api-key flag.

View your keys

The CLI stores your keys in the Restricted keys section on the API keys page, and on your local machine in ~/.config/stripe/config.toml.

View your permissions

Use these steps to view the permissions associated with your restricted key:

  1. Open the API keys page.
  2. Scroll down to the Restricted keys section.
  3. Hover over the Info icon () next to your CLI key name to view permissions.

Specify an API key

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
Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Join our early access program.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc