# Stripe CLI reference

## Stripe CLI reference

This reference documents every command and flag available in Stripe’s command-line interface.

The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal.

With the CLI, you can:
- Create, retrieve, update, and delete [API objects](https://docs.stripe.com/cli/resources.md).
- [Tail API request logs](https://docs.stripe.com/cli/logs/tail.md) in real time.
- [Securely test webhooks](https://docs.stripe.com/cli/listen.md) without relying on third-party tunneling software.

Follow the [installation guide](https://docs.stripe.com/stripe-cli.md#install) to set up the Stripe CLI.

## login

Connect the CLI to your Stripe account by logging in to persist your secret key locally.

The Stripe CLI runs commands using a global configuration or project-specific configurations. To configure the CLI globally, run:

```sh
stripe login
```

You'll be redirected to the Dashboard to confirm that you want to give the CLI access to your account. After confirming, a new API key will be created for the CLI.

> All configurations are stored in `~/.config/stripe/config.toml`, including login credentials. You can use the [`XDG_CONFIG_HOME`](https://wiki.archlinux.org/index.php/XDG_Base_Directory) environment variable to override this location. The configuration file is not automatically removed when the CLI is uninstalled.

**Command:** `stripe login`

### Flags

- `-i, --interactive`
  Use interactive configuration mode if you cannot open a browser and would like to manually provide an API key.

- `--project-name=<project>`
  You can create project-specific configurations with the `--project-name` flag, which can be used in any context.
If you do not provide the `--project-name` flag for a command, it will default to the global configuration.

### Examples

**Basic login**

```sh
stripe login
```

**Log in and specify a project**

```sh
stripe login --project-name=rocket-rides
```

```
Your pairing code is: excels-champ-wins-quaint
This pairing code verifies your authentication with Stripe.
Press Enter to open the browser
...
```

**Log in using interactive mode**

```sh
stripe login --interactive
```

```
Enter your API key:
Your API key is: sk_******************************p7dc
...
```

## sandbox

If your CLI isn't logged into Stripe, this command provisions a new sandbox with working test API keys, without requiring an account. This enables you, a coding agent, or an automated workflow to start building a Stripe integration immediately.

Your temporary sandbox credentials are saved to your CLI profile so that other commands work without needing to log in. You can convert a sandbox into a full Stripe account within seven days with the `sandbox claim` command.

If you're already [logged in](https://docs.stripe.com/cli/login.md), `sandbox create` opens the sandbox management page in your Stripe Dashboard.

> Sandbox environments expire after 7 days. Claim your sandbox before it expires by running `stripe sandbox claim` to keep your account and data.

**Command:** `stripe sandbox <command> [flags]`

### Subcommands

- `create`
  Provision a new sandbox environment with test API keys. Uses a proof-of-work challenge to verify the request, then saves the keys to your current CLI profile so subsequent `stripe` commands work immediately.

- `claim`
  Open the claim URL for your active sandbox in a browser. After claiming, run `stripe login` to get permanent keys.

### Flags for sandbox create

- `--email <address>`
  Your email address. Required unless `--from-git` is used. Mutually exclusive with `--from-git`.

- `--from-git`
  Infer your email and full name from `git config user.email` and `git config user.name`. Mutually exclusive with `--email`.

- `--full-name <name>`
  Your full name (optional). Automatically inferred if `--from-git` is used.

- `--non-interactive`
  Print output directly without waiting for input. Useful for scripting and agent-assisted workflows.

### Flags for sandbox claim

- `--non-interactive`
  Print the claim URL directly without waiting for input.

### Examples

**Create a sandbox with an email**

```sh
stripe sandbox create --email you@example.com
```

```
Setting up your sandbox... done.
{
  "secret_key": "rkcs_test_abc123",
  "publishable_key": "pk_test_def456",
  "claim_url": "https://dashboard.stripe.com/onboard_sandbox/0000000...",
  "account_id": "acct_ghi789",
  "expires_at": "2026-06-23"
}

Use the keys above to start building your integration.

This sandbox expires 2026-06-23 (in 7 days). Claim it before then by using the above claim_url or running `stripe sandbox claim`.
```

**Create a sandbox using git config**

```sh
stripe sandbox create --from-git
```

```
Using email: you@example.com (from git config)
Setting up your sandbox... done.
{
  "secret_key": "rkcs_test_abc123",
  "publishable_key": "pk_test_def456",
  "claim_url": "https://dashboard.stripe.com/onboard_sandbox/0000000...",
  "account_id": "acct_ghi789",
  "expires_at": "2026-06-23"
}

Use the keys above to start building your integration.

This sandbox expires 2026-06-23 (in 7 days). Claim it before then by using the above claim_url or running `stripe sandbox claim`.
```

**Claim your sandbox**

```sh
stripe sandbox claim
```

```
Claim your sandbox (acct_ghi789) by visiting the claim link below.

Press Enter to open the browser or visit https://dashboard.stripe.com/onboard_sandbox/000000...
```

## Using Stripe API keys

The Stripe CLI supports several different ways to set and use [API keys](https://docs.stripe.com/keys.md):

1. [`stripe login`](https://docs.stripe.com/cli/login.md)
2. [`stripe config`](https://docs.stripe.com/cli/config.md)
3. [`--api-key` flag](https://docs.stripe.com/cli/api_keys.md)
4. Environment variables

Each supports a different use case. `stripe login` is the easiest and recommended way to get started. Running this command will prompt you to log in from your browser and persist your API key locally, rather than requiring it for each command. If you want to provide an API key manually, you can use `stripe login --interactive`.

Using `stripe config` allows you to set persistent keys manually:
- `stripe config --set test_mode_api_key sk_test_123`

`--api-key` is a global flag that overrides your local configuration if you need to run one-off commands with a specific API key.

You can set two environment variables, which take precedence over all other values:

- `STRIPE_API_KEY`: the API key to use for the CLI.
- `STRIPE_DEVICE_NAME`: the device name for the CLI, visible in the Dashboard.

## config

Use the `config` command to manually set configuration options for the
CLI. The `config` command supports:

* Setting options
* Unsetting options
* Listing all configured options
* Opening the configuration file with your default editor

All commands support the `--project-name` global flag. You can define a unique configuration for individual projects.

**Command:** `stripe config`

### Flags

- `-e, --edit`
  Opens the configuration file in your default editor.

- `--list`
  Lists all configured options (including defaults).

- `--set <option> <value>`
  Set a value for the specified configuration option.

- `--unset <option>`
  Unset the configuration option and remove the key-value pair from the configuration file.

### Examples

**Set a configuration option**

```sh
stripe config --set color on
```

**Unset a configuration option**

```sh
stripe config --unset color
```

**List the currently configured options**

```sh
stripe config --list
```

```
color = "on"

[default]
  device_name = "st-stripe1"
  live_mode_api_key = "rk_live_abc123"
  live_mode_publishable_key = "pk_live_abc123"
  test_mode_api_key = "rk_test_abc123"
  test_mode_publishable_key = "pk_test_abc123"
```

## completion

The Stripe CLI supports autocompletion for macOS and Linux to make it easier to use the right commands with the CLI with the Bash and ZSH shells.

Set up autocompletion by running `stripe completion`. Depending on your platform and shell, relevant instructions will be displayed.

Details around setting up autocompletion can be also found in the [Terminal Autocompletion](https://docs.stripe.com/stripe-cli/configure.md#autocompletion) section of our configuration guide.

> Shell completion scripts are not currently supported on Windows.

**Command:** `stripe completion`

### Flags

- `--shell <platform>`
  The shell for which autocompletion commands will be generated. By default the CLI will attempt to autodetect the platform.
    - `bash`
      Use for Bash environments.
    - `zsh`
      Use for ZSH environments.

### Examples

**Basic usage**

```sh
stripe completion
```

**Specifying a shell**

```sh
stripe completion --shell zsh
```

## Global Flags

The Stripe CLI supports a number of flags for every command.

**Command:** `stripe {command} <arguments>`

### Flags

- `--api-key <stripe_api_key>`
  Use the Stripe account associated with this Stripe API secret key.

- `--color <setting>`
  Enable or disable color output.
    - `on`
      Enable color output.
    - `off`
      Disable color output.
    - `auto`
      Use the default output color based on global settings.

- `--config <config_filepath>`
  Use this file path for the CLI's configuration file (default: `$HOME/.config/stripe/config.toml`).

- `--device-name <name>`
  Run this command on behalf of another device.

- `-h, --help`
  Provides the help documentation for a given command, including the supported flags and arguments.

- `--log-level <level>`
  Set the level of detail for log messages (default: `info`)
    - `debug`
      Useful for development purposes.
    - `info`
      Shows standard logs that come up.
    - `warn`
      Shows warnings that are detected.
    - `error`
      Shows every log including errors that arise.

- `-p, --project-name <name>`
  Define a project name for the CLI's current configuration. Using the `--project-name` flag enables multiple configurations across Stripe accounts (stored within one configuration file), and any command can run in the context of a project (default: `"default"`).

- `-v, --version`
  Prints the version of the Stripe CLI. This flag is meant to run without any other flags or arguments set.

## docs

Browse docs.stripe.com from the terminal. Read any documentation page by
passing its path, or use the `api` and `search` subcommands to look up API
reference pages and search documentation by keyword.

**Command:** `stripe docs`

### Arguments

- `<path>`
  Path of the docs.stripe.com page to read (for example, `/payments` or `/api/customers`).

### Flags

- `--no-pager`
  Write output directly to stdout instead of opening an interactive pager.

- `--non-interactive`
  Write output directly to stdout without the interactive browser.

### Examples

**Read a documentation page**

```sh
stripe docs /payments
```

**Read an API reference page**

```sh
stripe docs /api/customers
```

## docs api

Look up Stripe API reference documentation by resource name, HTTP method
and path, or event type.

**Command:** `stripe docs api`

### Arguments

- `<method|resource|event>`
  Identifier used to look up an API reference page.
    - `resource`
      Resource name (for example, `product` or `customer`).
    - `<method> <path>`
      HTTP method and path (for example, `GET /v1/products` or `POST /v1/products/{id}`).
    - `<event>`
      Event type (for example, `charge.succeeded` or `payment_intent.created`).

### Examples

**Look up a resource**

```sh
stripe docs api product
```

**Look up by HTTP method and path**

```sh
stripe docs api GET /v1/products
```

**Look up an event type**

```sh
stripe docs api charge.succeeded
```

## docs search

Search docs.stripe.com from the terminal by keyword or phrase.

**Command:** `stripe docs search`

### Arguments

- `<query>`
  Keyword or phrase to search for on docs.stripe.com.

### Examples

**Search by keyword**

```sh
stripe docs search refund
```

**Search by phrase**

```sh
stripe docs search "dispute evidence"
```

## Stripe commands

Inspect details about your Stripe integration, logs, and service availability.

## logs tail

Establishes a direct connection with Stripe, allowing you to tail your test mode Stripe API request logs in real-time from your terminal.

Multiple filters can be used together and a log entry must match all filters to be shown.

When specifying a filter, multiple values can be provided as a comma-separated list. A log entry only needs to match one of the values.

> `logs tail` only supports displaying *test mode* request logs.

**Command:** `stripe logs tail`

### Flags

- `--filter-account <values>`
  Filter request logs by the source and destination account.
    - `connect_in`
      Incoming Connect requests.
    - `connect_out`
      Outgoing Connect requests.
    - `self`
      Non-Connect requests.

- `--filter-http-method <values>`
  Filter request logs by HTTP method.
    - `GET`
      HTTP GET requests.
    - `POST`
      HTTP POST requests.
    - `DELETE`
      HTTP DELETE requests.

- `--filter-ip-address <values>`
  Filter request logs by IP address.

- `--filter-request-path <values>`
  Filter request logs that directly match any Stripe path (e.g. `/v1/charges`).

- `--filter-request-status <values>`
  Filter request logs by the response status.
    - `SUCCEEDED`
      Requests that succeeded (HTTP 200, 201, 202 status codes).
    - `FAILED`
      Requests that failed (HTTP 4xx and 5xx status codes).

- `--filter-source <values>`
  Filter request logs by the source of each request.
    - `API`
      Requests created with the Stripe API.
    - `DASHBOARD`
      Requests created from the Dashboard.

- `--filter-status-code <values>`
  Filter request logs by HTTP status code.

- `--filter-status-code-type <values>`
  Filter request logs by the type of HTTP status code.
    - `2XX`
      HTTP 2xx status codes.
    - `4XX`
      HTTP 4xx status codes.
    - `5XX`
      HTTP 5xx status codes.

- `--format <value>`
  Specifies the output format for request logs.
    - `JSON`
      Output logs in JSON format.

### Examples

**Basic usage**

```sh
stripe logs tail
```

```
> Ready! You're now waiting to receive API request logs
2022-01-28 09:47:46 [200] POST /v1/customers [req_abc123]
2022-01-28 09:48:22 [200] POST /v1/charges [req_def456]
2022-01-28 09:48:58 [200] POST /v1/charges [req_ghi789]
...
```

**Use multiple log filters**

```sh
stripe logs tail \
    --filter-http-method POST \
    --filter-status-code-type 4XX
```

**Use multiple values for log filters**

```sh
stripe logs tail --filter-http-method GET,POST
```

## open

Shortcut to open the Stripe documentation or Dashboard in your browser.

> Any Dashboard pages (that include `/test/` in the URL) can be viewed in live mode with the `--live` flag.

**Command:** `stripe open`

### Arguments

- `<shortcut>`
  Shortcut used to quickly open a page on [stripe.com](https://stripe.com).
    - `api`
      https://docs.stripe.com/api
    - `apiref`
      https://docs.stripe.com/api
    - `cliref`
      https://docs.stripe.com/cli
    - `dashboard`
      https://dashboard.stripe.com/test
    - `dashboard/apikeys`
      https://dashboard.stripe.com/test/apikeys
    - `dashboard/atlas`
      https://dashboard.stripe.com/test/atlas
    - `dashboard/balance`
      https://dashboard.stripe.com/test/balance/overview
    - `dashboard/billing`
      https://dashboard.stripe.com/test/billing
    - `dashboard/connect`
      https://dashboard.stripe.com/test/connect/overview
    - `dashboard/connect/accounts`
      https://dashboard.stripe.com/test/connect/accounts/overview
    - `dashboard/connect/collected`
      https://dashboard.stripe.com/test/connect/application_fees
    - `dashboard/connect/transfers`
      https://dashboard.stripe.com/test/connect/transfers
    - `dashboard/coupons`
      https://dashboard.stripe.com/test/coupons
    - `dashboard/customers`
      https://dashboard.stripe.com/test/customers
    - `dashboard/developers`
      https://dashboard.stripe.com/test/developers
    - `dashboard/disputes`
      https://dashboard.stripe.com/test/disputes
    - `dashboard/events`
      https://dashboard.stripe.com/test/events
    - `dashboard/invoices`
      https://dashboard.stripe.com/test/invoices
    - `dashboard/logs`
      https://dashboard.stripe.com/test/logs
    - `dashboard/orders`
      https://dashboard.stripe.com/test/orders
    - `dashboard/orders/products`
      https://dashboard.stripe.com/test/orders/products
    - `dashboard/payments`
      https://dashboard.stripe.com/test/payments
    - `dashboard/payouts`
      https://dashboard.stripe.com/test/payouts
    - `dashboard/radar`
      https://dashboard.stripe.com/test/radar
    - `dashboard/radar/list`
      https://dashboard.stripe.com/test/radar/list
    - `dashboard/radar/reviews`
      https://dashboard.stripe.com/test/radar/reviews
    - `dashboard/radar/rules`
      https://dashboard.stripe.com/test/radar/rules
    - `dashboard/settings`
      https://dashboard.stripe.com/settings
    - `dashboard/subscriptions`
      https://dashboard.stripe.com/test/subscriptions
    - `dashboard/products`
      https://dashboard.stripe.com/test/products
    - `dashboard/tax`
      https://dashboard.stripe.com/test/tax-rates
    - `dashboard/terminal`
      https://dashboard.stripe.com/test/terminal
    - `dashboard/terminal/hardware/orders`
      https://dashboard.stripe.com/test/terminal/hardware_orders
    - `dashboard/terminal/locations`
      https://dashboard.stripe.com/test/terminal/locations
    - `dashboard/topups`
      https://dashboard.stripe.com/test/topups
    - `dashboard/transactions`
      https://dashboard.stripe.com/test/balance
    - `dashboard/webhooks`
      https://dashboard.stripe.com/test/webhooks
    - `docs`
      https://docs.stripe.com/

### Flags

- `--list`
  List all supported shortcuts.

- `--live`
  Open the Dashboard for your live integration (by default, runs in test mode).

### Examples

**Basic usage**

```sh
stripe open dashboard/webhooks
```

**Open the Dashboard in live mode**

```sh
stripe open dashboard/apikeys --live
```

**List available shortcuts in live mode**

```sh
stripe open --live --list
```

```
open supports the following shortcuts:

shortcut                              url
--------                              ---------
api               => https://docs.stripe.com/api
apiref            => https://docs.stripe.com/api
cliref            => https://docs.stripe.com/cli
dashboard         => https://dashboard.stripe.com
dashboard/apikeys => https://dashboard.stripe.com/apikeys
dashboard/atlas   => https://dashboard.stripe.com/atlas
...
```

## Webhook commands

Listen for [webhook events](https://docs.stripe.com/webhooks.md) and forward them to your application. Trigger and resend webhook events.

## listen

Receive webhook events from Stripe on your local machine via a direct connection to Stripe's API. The `listen` command can receive events based on your account's default API version or the latest version, filter by type of event, or forward events to an application running on a given port.

By default, `listen` accepts all snapshot webhook events and displays them in
your terminal. In order to listen to thin events, you must pass them in via `--thin-events`.

> You don't need to configure any webhook endpoints in your Dashboard to receive webhooks with the CLI.
> 
> The webhook signing secret provided will not change between restarts to the `listen` command.

**Command:** `stripe listen`

### Flags

- `-e, --events <events types>`
  A comma-separated list of which snapshot events to listen for. The [event types documentation](https://docs.stripe.com/api/events/types.md) includes a complete list (default: `[*]` for all events).

- `-f, --forward-to <url>`
  The URL that snapshot webhook events will be forwarded to. Returns a [webhook signing secret](https://docs.stripe.com/webhooks/signatures.md) which you can add to your application's configuration.

- `-H, --headers <values>`
  A comma-separated list of custom HTTP headers to forward.

Ex: `"Key1:Value1, Key2:Value2"`

- `-c, --forward-connect-to <url>`
  The URL that Connect webhook events will be forwarded to. By default, the same URL will be used for all snapshot webhook events.

- `--connect-headers <values>`
  A comma-separated list of custom HTTP headers to forward to any connected accounts. This is useful when testing a [Connect](https://docs.stripe.com/connect.md) platform.

Ex: `"Key1:Value1, Key2:Value2"`

- `--thin-events <events types>`
  A comma-separated list of which thin events to listen for. The [event types documentation](https://docs.stripe.com/api/v2/core/events/event-types.md) includes a complete list. Use `*` for all events. (default: none).

- `--forward-thin-to <url>`
  The URL that thin webhook events will be forwarded to. Returns a [webhook signing secret](https://docs.stripe.com/webhooks/signatures.md) which you can add to your application's configuration.

- `--forward-thin-connect-to <url>`
  The URL that thin Connect webhook events will be forwarded to. By default, the same URL will be used for all thin webhook events.

- `-l, --latest`
  Receive events used in the latest API version. By default, webhook events received will depend on your account's default API version.

- `--live`
  Make a live request (by default, runs in test mode).

- `-a, --load-from-webhooks-api`
  Listen for all webhook events based on your existing webhook endpoints configured in the Dashboard and API.

- `-j, --print-json`
  Print JSON objects to stdout.

- `--print-secret`
  Only print the webhook signing secret and exit.

- `--skip-verify`
  Skip certificate verification when forwarding to HTTPS endpoints.

### Examples

**Basic usage**

```sh
stripe listen
```

```
> Ready! Your webhook signing secret is whsec_abcdefg1234567
2022-01-28 09:47:46   --> customer.created [evt_abc123]
2022-01-28 09:48:22   --> charge.succeeded [evt_def456]
2022-01-28 09:48:58   --> charge.succeeded [evt_ghi789]
```

**Forward webhook events to an application**

```sh
stripe listen --forward-to http://localhost:4242
```

**Filter webhook events by type**

```sh
stripe listen --events=payment_intent.succeeded
```

## trigger

[Trigger example webhook events](https://docs.stripe.com/stripe-cli/triggers.md) to conduct local testing. These test webhook events are based on real API objects and may trigger other webhook events as part of the test (for example, triggering `payment_intent.succeeded` also triggers `payment_intent.created`).


The [event types documentation](https://docs.stripe.com/api/events/types.md) includes a complete list of webhook events and when they would be triggered.

> Events are triggered by issuing HTTP requests against the Stripe API. Because of this, triggering events causes side effects: all necessary API objects will be created in the process.

**Command:** `stripe trigger`

### Arguments

- `<event>`
  The webhook events we currently support are listed below (or using `stripe help trigger`):
    - `account.application.deauthorized`
      Occurs whenever a user deauthorizes an application. Sent to the related application only. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-account.application.deauthorized).
    - `account.updated`
      Occurs whenever an account status or property has changed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-account.updated).
    - `balance.available`
      Occurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-balance.available).
    - `charge.captured`
      Occurs whenever a previously uncaptured charge is captured. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.captured).
    - `charge.dispute.created`
      Occurs whenever a customer disputes a charge with their bank. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.dispute.created).
    - `charge.failed`
      Occurs whenever a failed charge attempt occurs. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.failed).
    - `charge.refunded`
      Occurs whenever a charge is refunded, including partial refunds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.refunded).
    - `charge.refund.updated`
      Occurs whenever a refund is updated, on selected payment methods. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.refund.updated).
    - `charge.succeeded`
      Occurs whenever a new charge is created and is successful. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.succeeded).
    - `checkout.session.async_payment_failed`
      Occurs when a payment intent using a delayed payment method fails. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_failed).
    - `checkout.session.async_payment_succeeded`
      Occurs when a payment intent using a delayed payment method finally succeeds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_succeeded).
    - `checkout.session.completed`
      Occurs when a Checkout Session has been successfully completed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.completed).
    - `customer.created`
      Occurs whenever a new customer is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.created).
    - `customer.deleted`
      Occurs whenever a customer is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.deleted).
    - `customer.source.created`
      Occurs whenever a new source is created for a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.source.created).
    - `customer.source.updated`
      Occurs whenever a source's details are changed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.source.updated).
    - `customer.subscription.created`
      Occurs whenever a customer is signed up for a new plan. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.created).
    - `customer.subscription.deleted`
      Occurs whenever a customer's subscription ends. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.deleted).
    - `customer.subscription.updated`
      Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.updated).
    - `customer.updated`
      Occurs whenever any property of a customer changes. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.updated).
    - `invoice.created`
      Occurs whenever a new invoice is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.created).
    - `invoice.finalized`
      Occurs whenever a draft invoice is finalized and updated to be an open invoice. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.finalized).
    - `invoice.paid`
      Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.paid).
    - `invoice.payment_action_required`
      Occurs whenever an invoice payment attempt requires further user action to complete. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_action_required).
    - `invoice.payment_failed`
      Occurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_failed).
    - `invoice.payment_succeeded`
      Occurs whenever an invoice payment attempt succeeds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_succeeded).
    - `invoice.updated`
      Occurs whenever an invoice changes (e.g., the invoice amount). Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.updated).
    - `issuing_authorization.request`
      Represents a synchronous request for authorization. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_authorization.request).
    - `issuing_card.created`
      Occurs whenever a card is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_card.created).
    - `issuing_cardholder.created`
      Occurs whenever a cardholder is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_cardholder.created).
    - `payment_intent.amount_capturable_updated`
      Occurs when a PaymentIntent has funds to be captured. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.amount_capturable_updated).
    - `payment_intent.canceled`
      Occurs when a PaymentIntent is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.canceled).
    - `payment_intent.created`
      Occurs when a new PaymentIntent is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.created).
    - `payment_intent.partially_funded`
      Occurs when funds are applied to a customer_balance PaymentIntent and the `amount_remaining` changes. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.partially_funded).
    - `payment_intent.payment_failed`
      Occurs when a PaymentIntent has failed the attempt to create a payment method or a payment. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.payment_failed).
    - `payment_intent.requires_action`
      Occurs when a PaymentIntent transitions to requires_action state. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.requires_action).
    - `payment_intent.succeeded`
      Occurs when a PaymentIntent has successfully completed payment. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.succeeded).
    - `payment_link.created`
      Occurs when a payment link is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_link.created).
    - `payment_link.updated`
      Occurs when a payment link is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_link.updated).
    - `payment_method.attached`
      Occurs whenever a new payment method is attached to a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_method.attached).
    - `payment_method.detached`
      Occurs whenever a new payment method is detached from a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_method.detached).
    - `payout.created`
      Occurs whenever a payout is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payout.created).
    - `payout.updated`
      Occurs whenever a payout is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payout.updated).
    - `plan.created`
      Occurs whenever a plan is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.created).
    - `plan.deleted`
      Occurs whenever a plan is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.deleted).
    - `plan.updated`
      Occurs whenever a plan is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.updated).
    - `price.created`
      Occurs whenever a price is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-price.created).
    - `price.updated`
      Occurs whenever a price is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-price.updated).
    - `product.created`
      Occurs whenever a product is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.created).
    - `product.deleted`
      Occurs whenever a product is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.deleted).
    - `product.updated`
      Occurs whenever a product is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.updated).
    - `quote.accepted`
      Occurs whenever a quote is accepted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.accepted).
    - `quote.canceled`
      Occurs whenever a quote is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.canceled).
    - `quote.created`
      Occurs whenever a quote is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.created).
    - `quote.finalized`
      Occurs whenever a quote is finalized. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.finalized).
    - `reporting.report_run.succeeded`
      Occurs whenever a requested `ReportRun` completed successfully. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-reporting.report_run.succeeded).
    - `setup_intent.canceled`
      Occurs when a SetupIntent is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.canceled).
    - `setup_intent.created`
      Occurs when a new SetupIntent is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.created).
    - `setup_intent.setup_failed`
      Occurs when a SetupIntent has failed the attempt to setup a payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.setup_failed).
    - `setup_intent.succeeded`
      Occurs when an SetupIntent has successfully setup a payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.succeeded).
    - `subscription_schedule.canceled`
      Occurs whenever a subscription schedule is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.canceled).
    - `subscription_schedule.created`
      Occurs whenever a subscription schedule is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.created).
    - `subscription_schedule.released`
      Occurs whenever a subscription schedule is released. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.released).
    - `subscription_schedule.updated`
      Occurs whenever a subscription schedule is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.updated).

### Flags

- `--stripe-account`
  Set a header identifying the connected account.

- `--override [resource]:[path1].[path2]=[value]`
  Override the param at `path1.path2` for the `resource`. Example: `--override plan:product.name=overrideName`. To index into an array, use bracket notation: `--override "checkout_session:line_items[0].quantity=10"`. In some shells, you may need to wrap the value in quotes to prevent shell interpretation of special characters like brackets.

- `--add [resource]:[path1].[path2]=[value]`
  Add the param `path1.path2` to the `resource`. Example: `--add payment_intent:customer=customerId`

- `--remove [resource]:[path1].[path2]`
  Remove the param at `path1.path2` from the `resource`. Example: `--remove customer:description`

- `--skip [param]`
  Skip specific steps in the trigger. Example: `--skip cus_jenny_rosen`

- `--edit`
  Edit the fixture directly in your default IDE before triggering. Cannot be used with `--add`, `--remove`, `--override`, or `--skip`.

### Examples

**Triggering an event**

```sh
stripe trigger invoice.payment_succeeded
```

```
Setting up fixture for: customer
Setting up fixture for: invoiceitem
Setting up fixture for: invoice
Setting up fixture for: invoice_pay
Trigger succeeded! Check dashboard for event details.
```

**Listing supported events**

```sh
stripe trigger --help
```

```
Supported events:
  balance.available
  charge.captured
  charge.dispute.created
  charge.failed
  charge.refunded
  charge.succeeded
...
```

## events resend

Resend an event to the CLI's local webhook endpoint. You must pass `--webhook-endpoint=we_123456` to resend the event to a specific webhook endpoint. You can only resend events that have been created within the last 30 days.

**Command:** `stripe events resend`

### Arguments

- `<event_id>`
  The ID of the event to resend.

### Flags

- `--account=<account_id>`
  To resend an event that's sent to a Connect webhook endpoint on a platform, set this flag to the connected account ID associated with the event. You can't use the `--stripe-account` parameter with Connect.

- `-c, --confirm`
  Skip the warning prompt and automatically confirm the command being entered.

- `--dark-style`
  Use a darker color scheme better suited for lighter command-line environments.

- `-e, --expand <value>`
  Response attributes to expand inline (target nested values with `nested[param]=value`).

- `-i, --idempotency <key>`
  Set an idempotency key for the request, preventing the same request from replaying within 24 hours.

- `--live`
  Make a live request (by default, runs in test mode).

- `-s, --show-headers`
  Show response HTTP headers.

- `--stripe-account <account_id>`
  Specify the Stripe account to use for this request.

- `-v, --stripe-version <version>`
  Specify the Stripe API version to use for this request.

- `--webhook-endpoint=<endpoint_id>`
  Resend the event to the given webhook endpoint ID (`we_123456`).

### Examples

**Basic usage**

```sh
stripe events resend evt_1PH9HU2eZvKYlo2CrSrLx8y1
```

**Response**

```
{
  "id": "evt_1PH9HU2eZvKYlo2CrSrLx8y1",
  "object": "event",
  "api_version": "2019-02-19",
  "created": 1715885036,
  "data": {
    "object": {
      "id": "card_1PH9HQ2eZvKYlo2CcwDOwdFV",
      "object": "card",
      "address_city": null,
      "address_country": null,
      "address_line1": null,
      "address_line1_check": null,
      "address_line2": null,
      "address_state": null,
      "address_zip": "12345",
      "address_zip_check": "pass",
      "brand": "Visa",
      "country": "US",
      "customer": "cus_Q7O3jQBjZLlpRL",
      "cvc_check": "pass",
      "dynamic_last4": null,
      "exp_month": 12,
      "exp_year": 2034,
      "fingerprint": "Xt5EWLLDS7FJjR1c",
      "funding": "credit",
      "last4": "4242",
      "metadata": {},
      "name": "user@gmail.com",
      "tokenization_method": null,
      "wallet": null
    }
  },
  "livemode": false,
  "pending_webhooks": 0,
  "request": {
    "id": "req_nqyTqVZmNKel38",
    "idempotency_key": "4bbe6edd-6d4e-4770-bf5a-f006cdf0e394"
  },
  "type": "customer.source.created"
}
```

## Resources & HTTP commands

The Stripe CLI supports two ways to create, update, and list objects based on API resources: resource commands and HTTP commands.

**Resource commands** directly manage API resources and provide different arguments, flags, and functionality based on which API resource is used.

**HTTP commands** are convenient shorthand for HTTP requests to the Stripe API. These requests can operate on individual API objects or lists of objects.

## resources

Resource commands make API requests using the CLI for a given resource. The Stripe CLI has commands to interact with all types of Stripe API resources.

A complete list of available resources and examples are included in the
[API Reference Guide](https://docs.stripe.com/api.md). Select **Stripe CLI** from the language dropdown to see a complete example for each resource.

Use the `help` command on any resource to see what operations you can perform. For example, run `stripe customers --help` to see help for the [Customers](https://docs.stripe.com/api/customers.md) resource.

Use `stripe resources` to see a complete list of available resources.

> All commands support making live requests with the `--live` flag.

**Command:** `stripe {resource command}`

### Arguments

- `<operation>`
  Operation to perform on API object. Each type of API resource includes a set of operations that you can perform (such as `delete`, `list`, and `retrieve`).

### Flags

- `--param=value`
  Parameters to attach to the operation being performed.

- `-d, --data <value>`
  Additional data to send with an API request. Supports setting nested values (e.g `nested[param]=value`).

### Examples

**Listing supported operations**

```sh
stripe customers --help
```

```
Available Operations:
  create
  delete
  list
...
```

**Create a resource**

```sh
stripe customers create \
    --email=billing@example.com \
    --name="Jenny Rosen" \
    --description="My First Test Customer"
```

**Update a resource**

```sh
stripe customers update cus_9s6XKzkNRiz8i3 \
    -d "metadata[key]=value"
```

**Retrieve a resource**

```sh
stripe customers retrieve cus_9s6XKzkNRiz8i3
```

**Response**

```
{
  "id": "cus_9s6XKzkNRiz8i3",
  "object": "customer",
  "address": null,
  "balance": 0,
  "created": 1680893993,
  "currency": null,
  "default_source": null,
  "delinquent": false,
  "description": "My First Test Customer",
  "discount": null,
  "email": "billing@example.com",
  "invoice_prefix": "0759376C",
  "invoice_settings": {
    "custom_fields": null,
    "default_payment_method": null,
    "footer": null,
    "rendering_options": null
  },
  "livemode": false,
  "metadata": {},
  "name": "Jenny Rosen",
  "next_invoice_sequence": 1,
  "phone": null,
  "preferred_locales": [],
  "shipping": null,
  "tax_exempt": "none",
  "test_clock": null
}
```

## get

Make GET HTTP requests to retrieve an individual API object (or set of objects).

You can pipe the output of this command to other tools. For example, you could use [jq](https://stedolan.github.io/jq/) to extract information from JSON the API returns, and then use that information to trigger other API requests.

See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths.

**Command:** `stripe get`

### Arguments

- `<id>`
  ID of the API object to retrieve.

- `<path>`
  URL path of the API object or set of objects to fetch.

### Flags

- `-c, --confirm`
  Skip the warning prompt and automatically confirm the command being entered.

- `--dark-style`
  Use a darker color scheme better suited for lighter command-line environments.

- `-d, --data <value>`
  Additional data to send with an API request. Supports setting nested values (e.g `nested[param]=value`).

- `-b, --ending-before <object_id>`
  Retrieve the previous page in the list. Pagination uses a cursor that depends on the ID of an object in the list.

- `-e, --expand <value>`
  Response attributes to expand inline (target nested values with `nested[param]=value`).

- `-i, --idempotency <key>`
  Set an idempotency key for the request, preventing the same request from replaying within 24 hours.

- `-l, --limit <number>`
  Number of objects to return, between 1 and 100 (default: 10).

- `--live`
  Make a live request (by default, runs in test mode).

- `-s, --show-headers`
  Show response HTTP headers.

- `-a, --starting-after <object_id>`
  Retrieve the next page in the list. Pagination uses a cursor that depends on the ID of an object in the list.

- `--stripe-account <account_id>`
  Specify the Stripe account to use for this request.

- `-v, --stripe-version <version>`
  Specify the Stripe API version to use for this request.

### Examples

**Get a specific charge by ID**

```sh
stripe get ch_1OKcnt2eZvKYlo2C99k9lfXl
```

**Response**

```
{
  "id": "ch_1OKcnt2eZvKYlo2C99k9lfXl",
  "object": "charge",
  "amount": 1000,
  "amount_captured": 1000,
  "amount_refunded": 0,
  "application": null,
  "application_fee": null,
  "application_fee_amount": null,
  "balance_transaction": "txn_1032Rp2eZvKYlo2CpErRBj09",
  "billing_details": {
    "address": {
      "city": null,
      "country": null,
      "line1": null,
      "line2": null,
      "postal_code": null,
      "state": null
    },
    "email": null,
    "name": null,
    "phone": null
  },
  "calculated_statement_descriptor": "Stripe",
  "captured": true,
  "created": 1701937169,
  "currency": "usd",
  "customer": null,
  "description": "Created by docs.stripe.com/ demo",
  "disputed": false,
  "failure_balance_transaction": null,
  "failure_code": null,
  "failure_message": null,
  "fraud_details": {},
  "invoice": null,
  "livemode": false,
  "metadata": {
    "order_id": "6735"
  },
  "on_behalf_of": null,
  "outcome": {
    "network_status": "approved_by_network",
    "reason": null,
    "risk_level": "normal",
    "risk_score": 23,
    "seller_message": "Payment complete.",
    "type": "authorized"
  },
  "paid": true,
  "payment_intent": "pi_1Gt0RG2eZvKYlo2CtxkQK2rm",
  "payment_method": "pm_1OKcns2eZvKYlo2CKsdIIi44",
  "payment_method_details": {
    "card": {
      "amount_authorized": 1000,
      "brand": "visa",
      "checks": {
        "address_line1_check": null,
        "address_postal_code_check": null,
        "cvc_check": "pass"
      },
      "country": "US",
      "exp_month": 12,
      "exp_year": 2024,
      "extended_authorization": {
        "status": "disabled"
      },
      "fingerprint": "Xt5EWLLDS7FJjR1c",
      "funding": "credit",
      "incremental_authorization": {
        "status": "unavailable"
      },
      "installments": null,
      "last4": "4242",
      "mandate": null,
      "moto": null,
      "multicapture": {
        "status": "unavailable"
      },
      "network": "visa",
      "network_token": {
        "used": false
      },
      "overcapture": {
        "maximum_amount_capturable": 1000,
        "status": "unavailable"
      },
      "three_d_secure": null,
      "wallet": null
    },
    "type": "card"
  },
  "radar_options": {},
  "receipt_email": null,
  "receipt_number": "1684-0467",
  "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKP6nmbIGMga3cB9wS6A6LBZL8h0qdoMC7kO1KupX02DAl5VwFXa4PrlrciExsDqlMq4dJYzVswnEzUi4",
  "redaction": null,
  "refunded": false,
  "refunds": {
    "object": "list",
    "data": [],
    "has_more": false,
    "url": "/v1/charges/ch_1OKcnt2eZvKYlo2C99k9lfXl/refunds"
  },
  "review": null,
  "shipping": null,
  "source_transfer": null,
  "statement_descriptor": null,
  "statement_descriptor_suffix": null,
  "status": "succeeded",
  "transfer_data": null,
  "transfer_group": null
}
```

**List the most recent 50 charges**

```sh
stripe get /v1/charges --limit 50
```

**Cancel past due subscriptions**

```sh
stripe get /v1/subscriptions -d status=past_due \
    | jq ".data[].id" \
    | xargs -I % -p stripe delete /subscriptions/%'
```

## post

Make POST HTTP requests to the Stripe API. The `post` command supports API features like idempotency keys and expandable objects.

See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths.

**Command:** `stripe post`

### Arguments

- `<path>`
  URL path of the API object to either create or update.

### Flags

- `-c, --confirm`
  Skip the warning prompt and automatically confirm the command being entered.

- `--dark-style`
  Use a darker color scheme better suited for lighter command-line environments.

- `-d, --data <value>`
  Additional data to send with an API request. Supports setting nested values (e.g `nested[param]=value`).

- `-e, --expand <value>`
  Response attributes to expand inline (target nested values with `nested[param]=value`).

- `-i, --idempotency <key>`
  Set an idempotency key for the request, preventing the same request from replaying within 24 hours.

- `--live`
  Make a live request (by default, runs in test mode).

- `-s, --show-headers`
  Show response HTTP headers.

- `--stripe-account <account_id>`
  Specify the Stripe account to use for this request.

- `-v, --stripe-version <version>`
  Specify the Stripe API version to use for this request.

### Examples

**Create a payment intent**

```sh
stripe post /v1/payment_intents \
    -d amount=2000 \
    -d currency=usd \
    -d "payment_method_types[]=card"
```

**Response**

```
{
  "id": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa",
  "object": "payment_intent",
  "amount": 2000,
  "amount_capturable": 0,
  "amount_details": {
    "tip": {}
  },
  "amount_received": 0,
  "application": null,
  "application_fee_amount": null,
  "automatic_payment_methods": null,
  "canceled_at": null,
  "cancellation_reason": null,
  "capture_method": "automatic",
  "client_secret": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa_secret_3LwqYVg0STglik0tqpkBQodvA",
  "confirmation_method": "automatic",
  "created": 1591919971,
  "currency": "usd",
  "customer": null,
  "description": "Created by docs.stripe.com/ demo",
  "invoice": null,
  "last_payment_error": null,
  "latest_charge": null,
  "livemode": false,
  "metadata": {},
  "next_action": null,
  "on_behalf_of": null,
  "payment_method": null,
  "payment_method_configuration_details": null,
  "payment_method_options": {
    "card": {
      "installments": null,
      "mandate_options": null,
      "network": null,
      "request_three_d_secure": "automatic"
    }
  },
  "payment_method_types": [
    "card"
  ],
  "processing": null,
  "receipt_email": null,
  "redaction": null,
  "review": null,
  "setup_future_usage": null,
  "shipping": null,
  "statement_descriptor": null,
  "statement_descriptor_suffix": null,
  "status": "requires_payment_method",
  "transfer_data": null,
  "transfer_group": null
}
```

## delete

Make DELETE HTTP requests to the Stripe API.

See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths.

**Command:** `stripe delete`

### Arguments

- `<path>`
  URL path of the API object to delete.

### Flags

- `-c, --confirm`
  Skip the warning prompt and automatically confirm the command being entered.

- `--dark-style`
  Use a darker color scheme better suited for lighter command-line environments.

- `-d, --data <value>`
  Additional data to send with an API request. Supports setting nested values (e.g `nested[param]=value`).

- `-e, --expand <value>`
  Response attributes to expand inline (target nested values with `nested[param]=value`).

- `-i, --idempotency <key>`
  Set an idempotency key for the request, preventing the same request from replaying within 24 hours.

- `--live`
  Make a live request (by default, runs in test mode).

- `-s, --show-headers`
  Show response HTTP headers.

- `--stripe-account <account_id>`
  Specify the Stripe account to use for this request.

- `-v, --stripe-version <version>`
  Specify the Stripe API version to use for this request.

### Examples

**Delete a customer**

```sh
stripe delete /v1/customers/cus_9s6XKzkNRiz8i3
```

```
Are you sure you want to perform the command: DELETE?
Enter 'yes' to confirm:
```

**Response**

```
{
  "id": "cus_9s6XKzkNRiz8i3",
  "object": "customer",
  "deleted": true
}
```

## fixtures

Use a JSON file to issue a series of API requests. This can be useful when generating sample data, executing specific flows, or testing API behavior.

The structure of the JSON file outlines the set of requests to perform, known as _fixture requests_. When you specify a request's `name`, the CLI stores the response so you can reference the output in subsequent requests. The `path` property specifies the Stripe URL route for the API resource used in the request (e.g. `/v1/customers`).

For example, to reference the response for the request named `json_path`:

- Accessing attributes in responses: `${name:json_path}`
- Accessing environment variables: `${.env:VARIABLE_NAME|<optional default value>}`

Fixture queries must start with `${` and end with `}` and can be included in fixture requests. `name` is the name of the request assigned as part of the fixture (`fixtures[].name`) and `json_path` is a dot-path to the specific variable requested. For example:

- Use `${cus_jenny_rosen:id}` to access a top-level attribute.
- Use `${cus_jenny_rosen:billing_details.address.country}` to access nested data.
- Use `{cus_jenny_rosen:subscriptions.data.#.id}` to access data within a list at index #.
- Use `${.env:PHONE}` to access environment variables (supports `.env` files).

Environment variables can specify default values with the pipe character (`|`). For example:

- `${.env:EMAIL|jane@stripe.com}`
- `${.env:CUSTOMER|cus_1234}`

**Command:** `stripe fixtures`

### Arguments

- `<filepath>`
  Use the JSON file at the given path that includes fixture requests to run.

### Fields

- `_meta`
  Metadata used by CLI during execution.
    - `template_version`
      Version of the template that is running (enables us to support potentially backwards-incompatible changes).

- `fixtures`
  List of requests to execute.
    - `name`
      Name of the request, used to later reference the response
    - `expected_error_type`
      Indicates that this request is expected to return an error of the specified [error type](https://docs.stripe.com/error-codes). When set, the fixture continues executing subsequent requests even if this request returns an error matching the specified type. If the error type does not match, the fixture fails. Common values include `card_error` and `invalid_request_error`.
    - `path`
      Stripe URL path for this request. URL paths can include variables from other fixture queries.
    - `method`
      HTTP method for the request: GET, POST, or DELETE.
    - `params`
      Parameters to include with the request. Accepted values include strings, integers, booleans, nested JSON structures, and fixture queries.

### Flags

- `--override [param]:[path1].[path2]=[value]`
  Override parameters in the fixture. Example: --override plan:product.name=overrideName

- `--add [param]:[path1].[path2]=[value]`
  Add parameters in the fixture. Example: --add customer:name=TestUser

- `--remove [param]:[path1].[path2]`
  Remove parameters from the fixture. Example: --remove customer:description

- `--skip [param]`
  Skip specific steps in the fixture. Example: --skip cus_jenny_rosen

### Examples

**Sample fixture**

```sh
{
  "_meta": {
    "template_version": 0
  },
  "fixtures": [
    {
      "name": "cus_jenny_rosen",
      "path": "/v1/customers",
      "method": "post",
      "params": {
        "name": "Jenny Rosen"
      }
    },
    {
      "name": "pi_jenny_rosen",
      "path": "/v1/payment_intents",
      "method": "post",
      "params": {
        "customer": "${cus_jenny_rosen:id}",
        "amount": 2000,
        "currency": "usd",
        "payment_method": "pm_card_visa",
        "capture_method": "manual",
        "return_url": "https://www.example.com",
        "confirm": true
      }
    },
    {
      "name": "pi_jenny_rosen_capture",
      "path": "/v1/payment_intents/${pi_jenny_rosen:id}/capture",
      "method": "post"
    }
  ]
}
```

**Run fixtures**

```sh
stripe fixtures ./fixtures.json
```

```
Setting up fixture for: cus_jenny_rosen
Setting up fixture for: pi_jenny_rosen
Setting up fixture for: pi_jenny_rosen_capture
```

## Additional commands

See additional functionality supported by the Stripe CLI.

## terminal quickstart

Use the `terminal quickstart` command to get up and running fast with Stripe Terminal and the Verifone P400 reader.

**Command:** `stripe terminal quickstart`

### Flags

- `--api-key=<api-key>`
  This CLI command only supports using the --api-key flag.

### Examples

**Terminal quickstart**

```sh
stripe terminal quickstart
```

## logout

Use the `logout` command to remove all credentials that connect the CLI to your Stripe account.

By default, credentials will be removed for the default project. Alternatively, you can remove credentials for a specific project or all known projects listed in your configuration file.

> It will take about 24 hours from when you log out for your device's name to stop showing up on the account's dashboard.

**Command:** `stripe logout`

### Flags

- `-a, --all`
  Remove credentials for all projects listed in your configuration.

- `--project-name=<project>`
  Remove the credentials tied to a specific project in your configuration.

### Examples

**Basic logout**

```sh
stripe logout
```

**Log out of a specific project**

```sh
stripe logout --project-name=rocket-rides
```

**Log out of all projects**

```sh
stripe logout --all
```

## feedback

Prints information about how to provide feedback for the Stripe CLI using [GitHub issues](https://github.com/stripe/stripe-cli/issues) and the [CLI feedback form](https://stri.pe/cli-feedback).

**Command:** `stripe feedback`

### Examples

**Basic usage**

```sh
stripe feedback
```

```
We'd love to know what you think of the CLI:

* Report bugs or issues on GitHub:
  https://github.com/stripe/stripe-cli/issues

* Leave us feedback on features you would like to see:
  https://stri.pe/cli-feedback
```

## help

Get help for any command in CLI with `stripe help [path to command]`.

> Every command will also accept the `-h` or `--help` flag to see help for that command.

**Command:** `stripe help`

### Examples

**Basic usage**

```sh
stripe help login
```

```
Login to your Stripe account to setup the CLI

Usage:
  stripe login [flags]

Flags:
  -h, --help          help for login
...
```

## version

Get the version of the Stripe CLI and check if software updates are available.

**Command:** `stripe version`

### Examples

**Basic usage**

```sh
stripe version
```

```
stripe version 1.3.0
A newer version of the Stripe CLI is available.
```

## Stripe Projects

Stripe Projects is a CLI plugin that lets you provision and manage third-party services such as databases, hosting, and AI providers directly from your terminal. Credentials are encrypted and stored in a project vault, and environment variables are automatically synced to your local `.env`.

For full documentation, see [Stripe Projects](https://docs.stripe.com/projects.md).

Install or upgrade the plugin with:

```sh
stripe plugin install projects
```

```sh
stripe plugin upgrade projects
```

> Stripe Projects is currently in developer preview. Commands and flags might change. Run `stripe projects --help` or `stripe projects <command> --help` to view the latest reference for your installed version.

## projects init

Initialize a new Stripe Projects workspace in the current directory. This creates project state files, an `AGENTS.md` context document for AI agents, and adds credential paths to `.gitignore` automatically.

Files created:
- `.projects/state.json`: Shared project state (safe to commit)
- `.projects/state.local.json`: Local machine associations (do not commit)
- `.projects/vault/vault.json`: Encrypted credential cache (do not commit)
- `.env`: Plaintext environment variables for local development (do not commit)
- `AGENTS.md`: LLM context file listing provider docs and env var names

**Command:** `stripe projects init`

### Arguments

- `<project-name>`
  Optional name for the project. Defaults to the current directory name.

### Flags

- `--from <url>`
  Initialize from a shared stack URL generated by `stripe projects share`. This provisions the same set of services into a new project.

### Examples

**Initialize a new project**

```sh
stripe projects init my-app
```

**Initialize from a shared stack URL**

```sh
stripe projects init --from https://projects.dev/s/abc123
```

## projects list

List all Stripe projects associated with your Stripe account. Returns each project's name, ID, and creation date. Use the project ID with `stripe projects pull`.

**Command:** `stripe projects list`

### Examples

**List all projects**

```sh
stripe projects list
```

```
NAME           ID                CREATED
my-app         proj_abc123       2026-05-01
staging-env    proj_def456       2026-04-15
```

## projects pull

Pull an existing Stripe Project into a new local directory. Creates local state files and writes a `.env` file populated with the project's credentials. Run this from an empty directory.

To find a project ID, run `stripe projects list`.

**Command:** `stripe projects pull`

### Arguments

- `<project-id>`
  The ID of the project to pull. Retrieve project IDs with `stripe projects list`.

### Examples

**Pull a project into a new directory**

```sh
stripe projects pull proj_abc123
```

## projects status

Show the current status of your project, which includes linked providers, provisioned resources, plan tiers, and service health.

**Command:** `stripe projects status`

### Examples

**Show project status**

```sh
stripe projects status
```

```
Project:  my-app (proj_abc123)

PROVIDER     SERVICE    TIER      STATUS
vercel       project    hobby     ✓ healthy
supabase     project    free      ✓ healthy
openrouter   api        free      ✓ healthy
```

## projects catalog

Browse the full service catalog, or inspect a specific provider's available services and plan tiers. Use this to discover service identifiers and plan names before running `stripe projects add`.

**Command:** `stripe projects catalog`

### Arguments

- `<provider>`
  Optional provider name to inspect. Omit to list all available providers.

### Examples

**List all available providers**

```sh
stripe projects catalog
```

**Inspect a provider's services and plans**

```sh
stripe projects catalog supabase
```

**Return the catalog as structured JSON**

```sh
stripe projects catalog supabase --json
```

## projects search

Search the service catalog by keyword. Returns providers and services matching the search term.

**Command:** `stripe projects search`

### Arguments

- `<keyword>`
  The search term to match against provider and service names.

### Examples

**Search for database services**

```sh
stripe projects search database
```

## projects add

Provision a service from a provider into your current project. The CLI authenticates with the provider, provisions the resource, saves encrypted credentials to `.projects/vault/vault.json`, and writes environment variables to `.env`.

Run `stripe projects billing add` before provisioning paid plan tiers.

**Command:** `stripe projects add`

### Arguments

- `<provider>/<service>`
  The provider and service to provision, for example `vercel/project` or `supabase/project`. Run `stripe projects catalog` to browse available providers and services.

### Flags

- `--config <json>`
  Pass a provider-specific configuration as a JSON string. Use it to specify plan tiers or provider options in non-interactive mode.

### Examples

**Add a service (interactive)**

```sh
stripe projects add vercel/project
```

**Add a service with a specific plan tier (non-interactive)**

```sh
stripe projects add amplitude/analytics \
  --config '{"plan_tier":"plus-v3-10k-mtu-monthly"}' \
  --no-interactive \
  --accept-tos
```

**Add a service and return JSON output**

```sh
stripe projects add openrouter/api \
  --no-interactive \
  --json \
  --auto-confirm
```

## projects link

Associate an existing provider account with your project without provisioning a new resource. Use this when you already have an account with a provider and want to connect it to your project.

The recommended first step in agent-driven workflows is to establish provider connections before running `stripe projects add`.

**Command:** `stripe projects link`

### Arguments

- `<provider>`
  The provider to associate, for example `vercel` or `supabase`.

### Examples

**Associate a provider account**

```sh
stripe projects link vercel
```

## projects remove

Remove a provisioned service from your project. This deprovisions the resource in the provider's system and removes it from your project state.

> This is a destructive operation. It deprovisions and deletes the resource in the provider's system. Back up any data before proceeding. You can't undo this action.

**Command:** `stripe projects remove`

### Arguments

- `<provider>/<service> | <resource-id>`
  The service to remove, specified as `<provider>/<service>` or by resource ID.

### Examples

**Remove by provider and service**

```sh
stripe projects remove supabase/project
```

**Remove by resource ID**

```sh
stripe projects remove res_abc123
```

## projects upgrade

Upgrade a provisioned service to a higher plan tier. You'll receive a prompt to select a plan and confirm billing using the payment method on file.

Run `stripe projects billing add` first if you haven't set up billing.

**Command:** `stripe projects upgrade`

### Arguments

- `<provider>/<service> | <resource-id> | <provider>`
  The service to upgrade, specified as `<provider>/<service>`, by resource ID, or by provider name.

### Examples

**Upgrade a specific service**

```sh
stripe projects upgrade vercel/project
```

**Upgrade by provider name**

```sh
stripe projects upgrade supabase
```

## projects open

Open the provider's dashboard in your default browser.

**Command:** `stripe projects open`

### Arguments

- `<provider>`
  The provider whose dashboard to open.

### Examples

**Open the Supabase dashboard**

```sh
stripe projects open supabase
```

**Open the Vercel dashboard**

```sh
stripe projects open vercel
```

## projects rotate

Rotate credentials for a provisioned service. This generates new API keys or secrets at the provider and updates the project vault.

After rotating, run `stripe projects env --pull` to refresh your local `.env` with the new credentials.

**Command:** `stripe projects rotate`

### Arguments

- `<provider>/<service> | <resource-id>`
  The service whose credentials to rotate, specified as `<provider>/<service>` or by resource ID.

### Examples

**Rotate credentials by provider and service**

```sh
stripe projects rotate supabase/project
```

**Rotate credentials by resource ID**

```sh
stripe projects rotate res_abc123
```

## projects env

Manage project environment variables, named environments, and environment resource membership. Running `stripe projects env` without flags or subcommands lists environment variable names with their values redacted.

Use `--pull` to sync credentials for the active environment to that environment's configured output file. Run `--pull` manually when:

- You're setting up the project on a new machine, or after cloning the repo.
- A teammate provisioned or rotated a resource and you need the updated credentials.
- Your environment output file was deleted or corrupted and you need to restore it.
- You switched environments or changed environment membership and need to refresh local credentials.

> `.projects/vault/vault.json` and environment output files, such as `.env`, are added to `.gitignore` by `stripe projects init`. Never commit either file.

**Command:** `stripe projects env`

### Subcommands

- `env list`
  List project environments and mark the active environment.

- `env show`
  Show the active environment, its output file, and resource membership.

- `env create <name> --output <path>`
  Create an environment and make it active.

- `env use <name>`
  Switch the active environment for this checkout.

- `env update --name <new-name>`
  Rename the active environment.

- `env update --output <path>`
  Change the active environment's output file.

- `env delete <name>`
  Delete an environment.

- `env add <resource_name>`
  Add an existing project resource to the active environment.

- `env remove <resource_name>`
  Remove a project resource from the active environment.

### Flags

- `--pull`
  Sync credentials for the active environment to that environment's configured output file.

- `--output <path>`
  Set the output file when creating an environment or changing the active environment's output file.

- `--name <new-name>`
  Rename the active environment.

### Examples

**List project environments**

```sh
stripe projects env list
```

**Create an environment and make it active**

```sh
stripe projects env create development --output .env.dev
```

**Add an existing resource to the active environment**

```sh
stripe projects env add dev-db
```

## projects billing

Manage the payment method and spend limits used for paid provider plans under Stripe Projects. We associate the payment methods with your Stripe account.

**Command:** `stripe projects billing`

### Subcommands

- `billing show`
  Display the payment method currently on file for Stripe Projects billing.

- `billing add`
  Add or update the payment method used for Stripe Projects billing. We require it before you can provision any paid plan tier.

- `billing update`
  Set or update global or per-provider monthly spend limits.

### Flags for billing update

- `--limit <amount>`
  Set a monthly spend cap in USD. It applies globally unless you also specify `--provider`.

- `--provider <provider>`
  Scope the spend limit to a specific provider. Per-provider limits take precedence over the global limit.

### Examples

**View the payment method on file**

```sh
stripe projects billing show
```

**Add or update a payment method**

```sh
stripe projects billing add
```

**Set a global 50 USD per month spend cap**

```sh
stripe projects billing update --limit 50
```

**Set a 20 USD per month cap for Supabase only**

```sh
stripe projects billing update --limit 20 --provider supabase
```

## projects spend

View the current and previous month's spend, broken down by provider.

**Command:** `stripe projects spend`

### Examples

**View spend by provider**

```sh
stripe projects spend
```

```
PROVIDER      THIS MONTH   LAST MONTH
vercel        0.00 USD     0.00 USD
supabase      0.00 USD     0.00 USD
openrouter    1.24 USD     3.87 USD
────────────────────────────────────
TOTAL         1.24 USD     3.87 USD
```

## projects share

Generate a shareable URL that encodes your project's service stack—providers and services only. Credentials are _never_ included in shared URLs.

Teammates can recreate the same stack in a new directory using `stripe projects init --from <url>`, or merge it into an existing project using `stripe projects import`.

**Command:** `stripe projects share`

### Examples

**Generate a share URL**

```sh
stripe projects share
```

```
Share URL: https://projects.dev/s/abc123
```

## projects import

Add services from a shared stack URL to your existing project. Unlike `stripe projects init --from`, this command merges the imported services into your current project's state without creating a new project.

**Command:** `stripe projects import`

### Arguments

- `<url>`
  A shared stack URL generated by `stripe projects share`.

### Examples

**Import services from a shared stack URL**

```sh
stripe projects import https://projects.dev/s/abc123
```

## projects llm-context

Generate an `AGENTS.md` context document for the current project. The file includes provider documentation, quickstart instructions, and environment variable names, formatted for use by AI coding agents (Claude, Codex, Gemini, Cursor, and similar tools).

**Command:** `stripe projects llm-context`

### Examples

**Generate the AGENTS.md context file**

```sh
stripe projects llm-context
```

## Stripe Tools

The `stripe tools` plugin lets you manage and configure certain aspects of your Stripe account directly from the command line. It provides access to account operations that aren't available through the standard CLI.

The `stripe tools` plugin requires Stripe CLI version 1.43.5 or later.

> The `stripe tools` CLI plugin is in [public preview](https://docs.stripe.com/release-phases.md).

## tools search

Search for supported account operations by keyword. Use the operation alias with the [`tools details`](https://docs.stripe.com/cli/tools/details.md) or [`tools execute`](https://docs.stripe.com/cli/tools/execute.md) commands.

**Command:** `stripe tools search`

### Arguments

- `<query>`
  Keyword to match against operation names and descriptions.

### Examples

**Search for branding operations**

```sh
stripe tools search "branding"
```

```
Found 2 matching operations:

## get_brand_settings
  Lists all branding settings.
  → Use "stripe tools details get_brand_settings" to see full parameters

## update_brand_settings
  Body params: checkout_background_color*, checkout_border_style, checkout_button_color, ...
  Updates branding settings.
  → Use "stripe tools details update_brand_settings" to see full parameters
```

## tools details

Return the schema for an account operation. The output includes the operation description, available parameters, types, and constraints.

**Command:** `stripe tools details`

### Arguments

- `<operation>`
  The operation alias to inspect. Run [`tools search`](https://docs.stripe.com/cli/tools/search.md) for a list of supported operations.

### Flags

- `--json`
  Output the schema as machine-readable JSON, instead of printing to stdout.

### Examples

**Return the 'get_brand_settings' schema as JSON**

```sh
stripe tools details get_brand_settings --json
```

**Output**

```
{
  "operation": {
    "alias": "get_brand_settings",
    "summary": "Retrieve brand settings",
    "short_description": "Lists all branding settings.",
    "description": "Lists all merchant branding settings for hosted surfaces and receipts.",
    "tags": ["Settings"],
    "parameters": {
      "path": [],
      "query": [
        {
          "name": "expand",
          "type": "array",
          "description": "Specifies which fields in the response should be expanded.",
          "required": false
        },
        {
          "name": "use_default_styles",
          "type": "boolean",
          "description": "If true, returns Stripe's default branding styles if unset on merchant instead of nil. Defaults to true.",
          "required": false
        }
      ],
      "body": []
    },
    "required_body_params": []
  }
}
```

## tools execute

Execute an account operation. Run `stripe tools details <operation>` before executing to view the required parameters and request body schema.

**Command:** `stripe tools execute`

### Arguments

- `<operation>`
  The operation name to execute, for example `get_brand_settings` or `update_brand_settings`.

### Flags

- `--body <json>`
  Pass a JSON request body for operations that accept one.

- `--live`
  Make a live request (by default, runs in test mode).

### Examples

**Execute an operation**

```sh
stripe tools execute get_brand_settings --live
```

**Execute an operation with a request body**

```sh
stripe tools execute update_brand_settings \
  --live \
  --body '{"primary_color": "rgb(82, 95, 127)", "icon": "file_123"}'
```

## Further information

See additional information how the Stripe CLI operates.

## Using with Docker

A [Docker image](https://hub.docker.com/r/stripe/stripe-cli) allows you to run the Stripe CLI in a container.

You can set two environment variables that the CLI will use:
- `STRIPE_API_KEY`: the API key to use for the CLI.
- `STRIPE_DEVICE_NAME`: the device name for the CLI, visible in the Dashboard.


Since Docker containers are ephemeral, `stripe-cli login` cannot be used without defining a data volume. You can use the `--api-key` flag instead.

## Telemetry

The Stripe CLI includes a telemetry feature that collects usage data to help us improve the developer experience. This feature is **enabled by default**.

## What data is collected

The Stripe CLI collects:
- Command usage patterns (which commands are run, how often)
- Error rates and types to help identify issues
- Performance metrics (command execution times)
- Operating system and CLI version information
- If detected, the name of AI coding agents invoking the CLI (such as Claude Code, Cursor, or Cline)

## What is NOT collected

We do **not** collect:
- API keys or authentication credentials
- Personal information or identifiable data
- File names, paths, or source code
- Command arguments or flag values
- Any data from your Stripe account

## Why we collect this data

Telemetry data helps us:
- Prioritize which features and commands to improve
- Identify and fix bugs more quickly
- Understand how developers use the CLI in different environments
- Optimize performance for common workflows

## How to opt out

To disable telemetry, set the `STRIPE_CLI_TELEMETRY_OPTOUT` environment variable to `1` or `true`:

```bash
# Opt out for a single session
STRIPE_CLI_TELEMETRY_OPTOUT=1 stripe [command]

# Opt out permanently (add to your shell profile)
export STRIPE_CLI_TELEMETRY_OPTOUT=1
```

After opting out, the CLI will not send any telemetry data.

## License

The [Stripe CLI](https://github.com/stripe/stripe-cli) is licensed under the [Apache License 2.0](https://github.com/stripe/stripe-cli/blob/master/LICENSE) and verified on GitHub as being owned by [Stripe](https://github.com/stripe).
