#ignasidedieu_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/1324392049465884762
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- ignasidedieu_webhooks, 47 minutes ago, 7 messages
Hello
We generally recommend that you don't rely on the order of the webhook events and find a different approach to handle refund creation on your end.
This is due to async nature of the webhook events.. https://docs.stripe.com/webhooks#event-ordering
An alternative might be to try to retrieve refund object using the API when you receive refund.updated event prior to charge.refunded and create the refund in your DB using the object you get back.
What if we rely on the "refund.updated" event and create refund in our DB when we receive it? This way we'll ignore the charge.refunded. However I think that the "charge" object is not available in the "refund.updated"
That could work. Refund object does have charge | payment_intent parameters but they are expandable so these won't be included in the payload by default. You can call the Refund API to retrieve it while expanding these parameters to look at the associated charge. https://docs.stripe.com/api/refunds
When you receive refund.updated -> use the refund ID re_xxx and call this API while expanding charge/payment_intent: https://docs.stripe.com/api/refunds/retrieve
https://docs.stripe.com/api/expanding_objects
And what about the metadata? We receive some in the "charge.refunded" events but it's empty on the "refund.updated" ones, why is that?