Shell and API Explorer
Use a command-line interface to manage your integration and explore APIs.
Shell is a command line interface within Workbench that provides many of the same commands built into the Stripe CLI. When using Workbench, a minimal Shell is always available at the bottom of the pane, or use the Shell tab to launch a full-screen session.
Use the following Shell features to help you manage and debug your Stripe integration:
- Autocompletion: Shell provides tab completion for API requests and CLI commands.
- API Explorer: Use the built-in API Explorer to visually explore API resources and build API calls from Shell.
Note
Shell runs in the browser, so it has some limitations when compared to the Stripe CLI, which can receive and trigger webhook events on your local machine with a local event listener. See Test a webhooks integration with the Stripe CLI to learn more.
Initial setup![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Sign in to the Dashboard. From the Developers menu, click Workbench. Switch to the Shell tab.
Common mistake
Shell is read-only in live mode. Switch to test mode to run API requests that create, modify, or delete API objects.
Listen for events![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
- From the command line prompt, type
stripe listen
to listen for webhook events, then press Enter on your keyboard to run the command.
stripe listen
This listens to incoming events for your Stripe account.
Run your first API request![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
- Click New pane to open a new session in a pane alongside your existing session.
- Copy the command, paste it into the command line prompt, then press Enter on your keyboard.
- Copy the object identifier (in
id
) from the response for subsequent requests.
stripe products create \ --name="Introductory offer (Monthly)" \ --description="$0.99 per month"
This creates a product with a name and description.
Use the API Explorer![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
- Click API Explorer to show the interactive API Explorer on the right.
- Choose the
Products
resource and theUpdate
method. The API Explorer shows all the required and optional parameters for the Products resource. - Paste the object identifier from the previous step into the
Value
for theid
path argument. When you provide the API Explorer with an existing object’s identifier, it loads the properties of the existing product. - Update the optional parameter
description
to 1.99 USD per month. The API Explorer automatically populates Shell with the equivalent API command to update the product’s description. Press Enter to run the command and update the product. - Click Print SDK code to see the equivalent code snippet in the language of your choice.
Available commands![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Shell provides multiple commands in addition to the stripe
command (see the Stripe CLI reference).
Command | Purpose |
---|---|
cd | Navigates to other documentation pages |
clear | Clears all prior text from the shell |
ls | Lists Dashboard pages relative to the current one |
pwd | Prints the current page slug and title |
shortcuts | Displays keyboard shortcuts that you can use with Shell |
stripe | Available Stripe CLI commands (see the complete reference) |
whoami | Displays logged in merchant details |