#soumit_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/1301641257407352904
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ I'm not sure what you're trying to ask, but you should never assume you'll receive events "in order" on your webhook endpoint.
https://docs.stripe.com/webhooks#event-ordering
So lets say a subscription is up for renewal, can I safely assume that
customer.subscription.updated will always be sent before invoice.paid
No, you should never assume you'll receive Events in a particular order.
So, lets say that I didnot receive this customer.subscription.updated webhook, and i received the invoice.paid, so do you suggest to call subscription show api to look up for the current_period_end key
Yup, exactly.
Great, thanks for the help
Any time!
@mellow robin just a last question, assuming that I received the payment_intent.created event, before receiving any invoice.xxx event, so do you suggest to fetch the invoice, using payment_intent.created's invoice_id ?
Yup, exactly. The Payment Intent object in the Event should include an invoice field, which will contain the ID of the associated Invoice object if the Payment Intent is associated with an Invoice.
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-invoice
If you haven't already received the associated Invoice Event to capture the Invoice ID and details, then you can use the ID in the invoice field on the Payment Intent to retrieve the Invoice object and get its current state.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks for the help @mellow robin
also, regarding a previous thread, which you were addressing
https://discord.com/channels/841573134531821608/1298294345069232239
there were errors on the events dashboard, that said, it couldnot verify the payload
Can you share the error, or what you're referring to by payload?
Sorry, we typically don't reopen threads. You can share those details here
It looks like that's thrown because cancellation_details.reason isn't an accepted parameter for that endpoint:
https://docs.stripe.com/api/subscriptions/cancel#cancel_subscription-cancellation_details
Are you trying to use cancellation_details.feedback or cancellation_details.comment?