#.suryamani

1 messages · Page 1 of 1 (latest)

ancient rampartBOT
#

Hello .suryamani, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
.suryamani, 1 hour ago, 10 messages

hushed grove
#

Hello

#

What's up?

fluid moat
#

If user upgrade or downgrade plan which webhook event will generate?

#

I'm using gradution pricing table, When i try to generate invoice.payment_failed event but customer.subscription.updated event will generate

hushed grove
#

customer.subscription.updated will always fire whenever anything on the Subscription object changes.

#

So yes, that will fire each time there is an upgrade or downgrade

#

invoice.payment_failed would only fire if there is an actual failed payment attempt

fluid moat
hushed grove
#

Your webhook handler code needs to filter appropriately.

#

You need to decide which Events you are going to use when and then in the handler you ingest data accordingly.

#

The Events will always fire and always be sent to your Endpoint if it is listening for that Event type

#

You then filter within your Endpoint for what you care about

fluid moat
hushed grove
#

No sorry, that's not how this works. You are the developer here and you need to debug your code. I can't look at hundreds of lines of code and debug for you -- I'm helping multiple folks at once.

#

If you want to provide me the small snippet where you are retrieving the Checkout Session then we can look at that together

fluid moat
#

where should i filter the event?