-
Notifications
You must be signed in to change notification settings - Fork 377
Trigger command
The CLI will allow you to trigger a few test webhook events to conduct local testing. These test webhook events are real objects on the API and may trigger other webhook events as part of the test (e.g. triggering payment_intent.succeeded
will also trigger payment_intent.created
).
The webhook events we currently support are listed in the CLI help or in the list below.
To trigger an event, run:
$ stripe trigger <event>
Currently, the Stripe CLI supports triggering the following webhooks events:
balance.available
charge.captured
charge.dispute.created
charge.failed
charge.refunded
charge.succeeded
checkout.session.completed
customer.created
customer.deleted
customer.source.created
customer.source.updated
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
customer.updated
invoice.created
invoice.finalized
invoice.payment_failed
invoice.payment_succeeded
invoice.updated
issuing_authorization.request
issuing_card.created
issuing_cardholder.created
payment_intent.amount_capturable_updated
payment_intent.canceled
payment_intent.created
payment_intent.payment_failed
payment_intent.succeeded
payment_method.attached
setup_intent.canceled
setup_intent.created
setup_intent.setup_failed
setup_intent.succeeded
Events are triggered by making corresponding requests against the Stripe API, setting up additional objects as necessary. This means that triggering events will have side effects and will have properly backed API objects.
All triggers are defined in pkg/requests/examples.go
. They are setup as basic API requests so if you're comfortable, feel free to open a pull request adding new ones!
If you're having trouble adding a trigger, please open a feature request that we add one.