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 alertsBuild with LLMsStripe for Visual Studio CodeFile uploads
Security
Security
Extend Stripe
Stripe Apps
Stripe Connectors
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe CLI

Stripe CLI keys and permissions

Learn about default Stripe CLI keys generated when you run "stripe login" and their permissions.

Copy page

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.

About 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.

Where keys are stored

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

Where to find 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

  1. 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 programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc