#fadi obaji - webhooks & rate limit
1 messages · Page 1 of 1 (latest)
Nope! assuming that you mean us delivering to you
If you make API requests as part of your processing events, this would count though, of course
yes, i'm listening like 27 events in one endpoint and like 10 in a second end point
so it's okay to listen to a big number of events?
It is, if you need them
We recommend only listening to events you need to trigger you application logic (rather than subscribing to "all" events, or many you don't need)
Yes of course, once finished developing and switched to live, i will unsubscribe the events i don't need
still in test mode
I suggest starting with minimal events and adding when you find you need others, but that's up to you
If you can explain what you're trying to do we can likely help with picking those events
I'm building a subscription system for our website
i just count them, i'm only using 15 in the webhook handler
case 'promotion_code.created':
case 'promotion_code.updated':
case 'customer.subscription.created':
case 'customer.subscription.deleted':
case 'customer.subscription.updated':
case 'invoice.paid':
case 'invoice.voided':
case 'invoice.finalized':
case 'invoice.payment_succeeded':
case 'payment_method.detached':
case 'payment_method.attached':
case 'customer.created':
case 'customer.updated':
case 'product.updated':
case 'price.updated':
OK, and do you think you need all of those? What situations are you trying to handle?
I'm storing everything in our DB, to reduce API calls
Storing subscription objects, as well as invoices and customer objects
payment methods also
the product and price events are just going to happen once, when we make the live subscription and price. Then it will never gets triggered.
I think I don't need invoice.finalized
also the promotion codes events are not going to be triggered that often
maybe once every 3 months
Seems reasonable - yes you likely don't need the finalized event or even payment succeeded unless you intend to take some action after a payment
price and product update also not generally needed
Yeah they are very unlikely to happen, you can't update those i think, only the names