stripe-stateful-mock icon indicating copy to clipboard operation
stripe-stateful-mock copied to clipboard

[Feature Request]: Trigger webhook events

Open adamlacombe opened this issue 4 years ago • 1 comments

Looking for routes to trigger a webhook event request for e2e testing. To keep it simple the webhook endpoint could be provided using process.env["WEBHOOK_ENDPOINT"]

Example: api/customers.ts - create would trigger webhook event customer.created

I would be willing to submit a PR if this sounds like something you would like to include.

adamlacombe avatar Nov 27 '20 16:11 adamlacombe

Hi. Yup that makes sense to me. A PR would be very welcome.

If you can also support the retrieve event endpoint that would be great. Stripe often recommends people use that endpoint to protect against replay attacks.

pushplay avatar Nov 27 '20 19:11 pushplay