integrallis / stripe_event

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

multiple endpoints for stripe connect #144

Open simonsapiel opened 2 years ago

simonsapiel commented 2 years ago

Is there currently support for adding multiple endpoints? It seems that for stripe connect you would need

/webhook
/webhook/connect/

both according to the docs https://stripe.com/docs/connect/webhooks

danielricecodes commented 1 year ago

I've been struggling with this, also. Currently, I have both Account and Connect endpoints going to /webhooks/stripe. Since EventFilters are set globally, there's no way for me - that I can see - to set EventFilters based on the stripe event type or whether its a "connect" or "Account" generated webhook.

If EventFilters could be applied more selectively, such as when using events.subscribe, or if I could delegate "connect" webhooks to one PORO, and "account" events to another PORO, that would really solve the dilemma.

If I find a solution I'll try to remember to update this Issue.