Even simpler: add this endpoint to your application when running locally (not in prod!):
const eventsSeen = new Set(); app.post("/test/simulate-stripe-webhook", async (req, res) => { const events = await stripe.events.list({ limit: req.query.limit || 10 }); for (const event of events) { if (eventsSeen.has(event.id)) continue; await processStripeEvent(event); eventsSeen.add(event.id); } return res.status(200).end(); });
... where processStripeEvent is any logic that your web hook fires.
Then there is no need to manage strip web leads.
source share