stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.57k stars 362 forks source link

Ability to define in a delay in webhook delivery #1069

Open that-guy-iain opened 1 year ago

that-guy-iain commented 1 year ago

Problem

Test a workflow that would never happen within ms of each other. For example, charge.dispute.created causes race conditions because the charge.succeed event is still being processed when the charge.dispute.created event is delivered and started to be processed.

There are other events that have this issue.

Feature

The ability to have a flag or config that allows for defining of a delay in delivery of the webhook to the endpoint when using the listen command

Examples

stripe listen --skip-verify --forward-to localhost/webhook --delay 1 would add a delay of 1 second from the cli receiving the webhook to delivering it to the endpoint.