integrallis / stripe_event

Stripe webhook integration for Rails applications.
https://rubygems.org/gems/stripe_event
MIT License
840 stars 107 forks source link

Stripe Events not in order #75

Closed whitewolf92 closed 7 years ago

whitewolf92 commented 7 years ago

I noticed that sometimes the stripe events are not in order. For example, invoice.created maybe come at a later date after invoice.payment_succeeded and charge.succeeded.

I read that the only solution is to reject the webhooks and stripe will send them at a later date. How can do it with stripe_event?

rmm5t commented 7 years ago

Stripe will retry webhooks later after receiving something other than a 2xx HTTP status code. More information about this (and the associated retry timing) can be found here: https://stripe.com/docs/webhooks#responding-to-a-webhook

To return something other than a 200 OK using stripe_event, you can raise an exception to trigger the included WebhookController to return a non-200 status code.

rmm5t commented 7 years ago

Btw, please take any further questions like this to a site like StackOverflow. GitHub Issues are best reserved for discussing feature requests and bug reports.

whitewolf92 commented 7 years ago

Thanks and noted