Feras from buttercloud here (author is my co-worker).<p>We have a complex application that heavily interacts with webhooks - that's what prompted us to create StripeTester. We can now easily spec out the interactions and set expectations when a webhook is received. A side benefit is that this can be used without connectivity and really cleans up our test suite.<p>Previously, we used Requestbin for manual webhook testing, and made heavy use of Mocha for stubbing. This required us to maintain fixtures and test data to simulate Stripe's.<p>There's also <a href="https://github.com/mindeavor/stripe-ruby-mock" rel="nofollow">https://github.com/mindeavor/stripe-ruby-mock</a> that provides some testing hooks (although repo says it's incomplete). We're planning on keeping the webhook data up-to-date when Stripe releases newer versions.
What are the values in the body that is sent in a webhook? Are those dummy values.<p>Mostly, in response of a Stripe webhook, one would want to do something based on the id. For instance, for a charge failed event, one would like to retrieve the customer for which the charge has failed and would retrieve the customer details from Stripe. Dummy values will not help here.<p>Just thinking aloud, how would one use this? I have been in need for something to test Stripe webhooks.
Thank you so much! I maintain a gem for drop-in subscription support which integrates with Stripe[1], and improving test coverage and implementing more robust webhooks support has been on my to-do list for a few months now. Seeing this on HN is like receiving a pull request for half of that work. Thanks, again! :-)<p>[1] <a href="http://github.com/andrewculver/koudoku" rel="nofollow">http://github.com/andrewculver/koudoku</a>
This is very awesome and super useful! When you rely heavily on Stripe events it can get out of control. Stripe needs a doc with real world scenarios and what events get called. I'm definitely going to try and port this to Python.