# Stripe CLI Reference: Listen

The Stripe CLI's `listen` command allows you to forward Stripe events from your Stripe account to your local development environment. This is crucial for testing webhooks and ensuring your application responds correctly to events.

## Usage

```bash
stripe listen [flags]
```

## Description

The `listen` command starts a local server that listens for incoming Stripe webhooks. It then forwards these webhooks to a specified local URL. This enables you to develop and test your webhook handlers without needing to deploy your application to a public server.

## Key Features

*   **Event Forwarding:** Receives events from your Stripe account and sends them to your local machine.
*   **Webhook Simulation:** Allows you to simulate various Stripe events for testing purposes.
*   **Configuration:** Supports configuration of the local URL to which events should be forwarded.

## Examples

To start listening for events and forward them to `http://localhost:4242/webhook`:

```bash
stripe listen --forward-to localhost:4242/webhook
```

You can also specify the Stripe API version to use for the forwarded webhooks:

```bash
stripe listen --forward-to localhost:4242/webhook --api-version 2020-08-27
```

## Flags

*   `--forward-to` or `-f`: The local URL to which Stripe events should be forwarded. This is a required flag.
*   `--api-version`: The Stripe API version to use for the forwarded webhooks. If not specified, the latest API version will be used.
*   `--events` or `-e`: Filter the types of events to forward. You can specify multiple events separated by commas. For example: `--events charge.succeeded,customer.created`.
*   `--locale`: The locale to use for the CLI output.
*   `--log-color`: Force log color output.
*   `--log-format`: Log format for the CLI output.
*   `--log-level`: Log level for the CLI output.
*   `--skip-verify`: Skip webhook signature verification. Use with caution, as this bypasses a critical security check.
*   `--webhook-secret`: The webhook signing secret for your endpoint. If not provided, the CLI will attempt to retrieve it from your Stripe configuration.

## Related Commands

*   `stripe trigger`: Manually trigger Stripe events to test your webhook handlers.
*   `stripe logs tail`: View live logs of events and requests in your Stripe account.
*   `stripe api_keys`: Manage your Stripe API keys.