Skip to content
Create account or Sign in
The Stripe Docs logo
/
Ask AI
Create accountSign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer resources
APIs & SDKsHelp
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Essentials
SDKs
API
Testing
Stripe CLI
    Overview
    Install the CLI
    Use the CLI
    Enable autocompletion
    CLI keys
    Trigger events
    Upgrade the CLI
Sample projects
Tools
Stripe Dashboard
Workbench
Developers Dashboard
Stripe Shell
Stripe for Visual Studio Code
Features
Workflows
Event Destinations
Stripe health alertsFile uploads
AI solutions
Agent toolkit
Model Context ProtocolBuild agentic AI SaaS Billing workflows
Security and privacy
Security
Stripebot web crawler
Privacy
Extend Stripe
Build Stripe apps
Use apps from Stripe
Partners
Partner ecosystem
Partner certification
United States
English (United Kingdom)
HomeDeveloper resourcesStripe CLI

Trigger webhook events with the Stripe CLI

Learn how to trigger webhook events in a sandbox.

There are two ways to trigger webhook events in a sandbox:

  • Do the actions that lead to the event you want to trigger. For example, creating a Customer with the Stripe API or in the Stripe Dashboard generates a customer.created event.
  • Run a command with the Stripe CLI to automatically generate the event.

Trigger events

To see the name of all events supported by the Stripe CLI, run this command:

To trigger a specific event, run the following command by replacing <EVENT> with the name of the event:

For example, this command triggers the payment_intent.succeeded event:

Then, you can view the event in the Events page of the Dashboard or by using the stripe listen command.

Note

Depending on the event that you trigger, the Stripe CLI might generate multiple related events. For example, when running stripe trigger price.created, the Stripe CLI needs to create a product to create a price, so it generates two events: product.created and price.created.

Customise events

To generate events, the Stripe CLI calls the Stripe API with some predefined parameters. For example, to trigger the payment_intent.succeeded event, the Stripe CLI calls the Create PaymentIntent endpoint, with the amount parameter set to 2000. You can change these API parameters with the override flag.

The following are override examples:

You can also combine multiple overrides on different resources.

To figure out which resources and parameters you can change, review the relevant triggers in the GitHub repository of the Stripe CLI.

Advanced event customisation

If the available events or overrides aren’t sufficient for your use case, you can write a JSON file describing how to generate an event and use the CLI to trigger that event. To learn more, see Create and use fixtures.

Was this page helpful?
YesNo
  • Need help? Contact Support.
  • Check out our changelog.
  • Questions? Contact Sales.
  • LLM? Read llms.txt.
  • Powered by Markdoc