#ivn-nieves_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1338506996160139305
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐
You need to inspect the decline code if you want to have more insights, not via webhook types
You can inspect the related chargeId to that event for example, which is ch_3Qqx5kKisS78xILJ1RL3TK6v and check it's decline code
๐
But the decline code could be the same in both scenarios, right?
Is there any way to know where the event comes from, in this case, if it comes from a checkout
Yes
but sorry wait, you want to distinguish between failure that comes from a Checkout Session and failure that comes from renewal ?
That's right โ
I'll stay tuned for any comment
Hi, my teammate needs to step away. Let me catch up
Do you have a failure event, invoice.payment_failed for a subscription's recurring billing?
Yes, but to be more specific, I want to ignore any events that originate from a Checkout Session. Is there a parameter that indicates an event came from a Checkout Session so I can programmatically filter it out when processing webhook events? Does that make sense?
There is billing_reason": "subscription_create", that you could look at: https://docs.stripe.com/api/invoices/object#invoice_object-billing_reason
If it's a failed payment from a normal recurring cycle, you would get billing_reason: "subscription_cycle",
That is how you'd distinguish here. Let me know if you have any questions on this
That makes sense, thank you @haughty coral ๐