#gpatra
1 messages · Page 1 of 1 (latest)
Hello! 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.
hi! that's a bit of a open-ended question but https://stripe.com/docs/billing/subscriptions/webhooks describes all the relevant webhooks for subscriptions. Beyond that it comes down to building and testing things in test mode and using the Dashboard to see what events occur when you make specific API calls or actions, and building up your system during development with that process.
I understood, these question is very specific, but i want to stick with one query.
Whenever a payment declins subscription.updated event triggered? So how can i identify it ?
This is success subscription update event or payment failed subscription update event
well for example the previous_attributes hash in the event shows what specifically has updated
so for example you might see "the status was active and is now past_due"
Let's say I am Free plan and updated to "Paid" but payment declins , subscription.updated is hitted with "Paid" plan, So i have to see previous_attribute ?
well if you update from a free plan to a paid plan you'd get the result of the payment immediately actually , per https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment, and I think you get the result immediately in the response from the API call(the call itself will return a decline) so you don't even need webhooks. So you really have to test the exact flows in test mode