Sign in
An image of the Stripe logo
Create account
Sign in
Home
Payments
Business operations
Financial services
Developer tools
Security
All products
Home
Payments
Business operations
Home
Payments
Business operations
Financial services
Developer tools
Support
Overview
Get started
Quickstarts
Stripe Shell
Stripe CLI
Get started
Autocompletion
CLI keys
Upgrade
Reference
Dashboard
Stripe for Visual Studio Code
Webhooks
File uploads
Error handling
API
Tour
Keys
Libraries
Upgrades
Rate limits
Card testing
Expanding responses
Domains and IP addresses
Search
Building With Stripe
React Stripe.js
Prebuilt iOS UI
Prebuilt Android UI
Extensions
Connectors
Samples
Checklist
Feedback
HomeDeveloper toolsStripe CLI

Stripe CLI keys and permissions

Learn about default Stripe CLI keys generated when you run "stripe login" and their 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 test mode, one live mode) that’re 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 on 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.
Terminal
stripe login --api-key
sk_test_4eC39HqLyjWDarjtT1zdp7dc
Was this page helpful?
Questions? Contact us.
View developer tutorials on YouTube.
Check out our product changelog.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
About restricted keys
Specify an API key
Stripe Shell
Test mode
▗▄ ▄▟█ █▀▀ ▗▟████▙▖ ██████ ███▗▟█ ███ ███▗▟██▙▖ ▗▟█████▙▖ ███▖ ▀▀ ███ ███▀▀▀ ███ ███▀ ███ ███ ███ ▝▜████▙▖ ███ ███ ███ ███ ███ █████████ ▄▄ ▝███ ███ ▄ ███ ███ ███▄ ███ ███ ▄▄ ▝▜████▛▘ ▝▜███▛ ███ ███ ███▝▜██▛▘ ▝▜█████▛▘ ███ ▀▘
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Login to Stripe docs and press Control + Backtick on your keyboard to start managing your Stripe resources in test mode. - View supported commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g. )
The Stripe Shell is best experienced on desktop.
$