#Merino
1 messages · Page 1 of 1 (latest)
Hi let's chat in this thread. What questions did you have?
Hello
I've been struggling to decide which events to listen, even though each situation is unique
There's a pattern to a successful attempt, and so on
Based on what I read in the best practices walkthrough I shouldn't listen to them all
While reading the events I noticed that there's a lot of repeated info so I guess my question is a "charge.succeeded" event is enough info on a successful attempt?
Or is it crazy to listen to a single event
Is there some kind of list with the most common webhook logic flows?
There's a chance you only need to listen to one event. Every integration is different and it depends what kind of info you need to track
What kind of payments are you accepting? One time or subscription?
We're working towards subscriptions, however we'd have also one time purchases, external packages that would give our clients 'N' extra uses of our product
With subscriptions we have a specific guide as those integrations tend to overlap a bit more: https://stripe.com/docs/billing/subscriptions/webhooks
For one time payments that can vary a bit depending on the flow
So every successful purchase is going to trigger a charge.succeeded event, and if it grants me every data that I need to track it's not crazy to listen only to this event?
If that gives you everything you need then that's fine. You may also want to think about whether you need to get notified about things like failed payments, disputes/chargebacks, etc.
For sure
Just to be sure, every successful subscription always triggers the same events?
Or there's a few default events between then, and some specific ones?
👋 stepping in as my teammate needs to hop off
Hello mate o/
I recommend testing this out in test mode by creating a subscription similar to how you'll create subscriptions in live mode. For the most part, a brand-new subscription for a brand-new customer should trigger customer.created, and customer.subscription.created, quickly followed by some invoice events if the subscription was set to charge automatically
For testing, I recommend working with Test Clocks: https://stripe.com/docs/billing/testing/test-clocks
Nice, I didn't knew this was a thing
It's going to help a lot
But is there some events that's always going to happen?
Talking only about a case, like success for example
Either way I'm going to read the test clocks and try out many different cases now, thanks
Just wanted to be sure if this was a thing or just coincidence
customer.subscription.created , customer.subscription.updated, invoice.created, invoice.finalized, payment_intent.created, payment_intent.succeeded, and invoice.paid events should always be sent with a new, successfully paid subscription