Forrest logo
back to the stripe tool

stripe:tldr:2e73d

stripe: Listen for events, filtering on events with the name `charge.succeeded` and forwarding them to localhost:3000/events.
$ stripe listen --events="${charge-succeeded}" --forward-to="${localhost:3000-events}"
try on your machine

This command is utilizing the Stripe CLI (Command Line Interface) to set up a webhook listener for a specific event called "charge-succeeded" and forward it to a local development server running on the specified URL "localhost:3000-events".

Here's a breakdown of the command components:

  1. stripe listen: This is the main command to start the webhook listener using the Stripe CLI.
  2. --events="${charge-succeeded}": This specifies the event that the webhook listener should listen for. In this case, it is set to "charge-succeeded". This event will be triggered whenever a payment charge is successfully processed.
  3. --forward-to="${localhost:3000-events}": This specifies the URL where the event payload should be forwarded. In this case, it is set to "localhost:3000-events", which indicates the local development server is running on the provided URL.

By executing this command, the Stripe CLI will set up a webhook listener that listens for the "charge-succeeded" event and forwards the event payload to the specified URL for further processing by a local server.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the stripe tool