#nicolas-fernandez-falco_charge-refund-updated

1 messages ยท Page 1 of 1 (latest)

torn walrusBOT
#

๐Ÿ‘‹ 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/1239564738900525157

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

valid nightBOT
#

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.

opal meteor
#

The first event happens when a refund is created, and in some cases we assume the refund is going to be successful (most are).

#

Since we may not get notification later on success, we have to assume success initially

#

However, they do sometimes fail and we get notified about that, and thats when we emit charge.refund.updated and the status will change from succeeded to failed
https://docs.stripe.com/testing#refunds

#

There's a test card you can use to simulate this kind of failed refund

#

Asynchronous failure 4000000000005126 The charge succeeds. If you initiate a refund, its status begins as succeeded. Some time later, its status transitions to failed and sends a charge.refund.updated webhook event.

sudden hazel
#

Hi!

#

I was asking because I'm also using Sandbox and if a use an ACH as the payment method the first event is the charge.refund whit a pending status

#

and later charge.refund.updated with the succeeded status

#

When I test using Credit Card it call my attention that I received the charge.refund event with the succeeded status

#

But later I also receieved the charge.refund.updated event with the same succeeded status

#

So I want to understand if the charge.refund.updated it will always be triggered dispate if the refund was immediately succeeded at the first time or not

opal meteor
#

Yep, some payment method types will use pending initially

#

I don't think it is always expected, no. Can you share an example of this case so we can look at what else changed?

I also receieved the charge.refund.updated event with the same succeeded status

#

There should be previous_attributes indicating some other change

sudden hazel
#

Yes

#

That's the charge

#

??

valid nightBOT
torpid ridge
#

Hi there ๐Ÿ‘‹ looking at the charge.refund.updated Event for that Charge, I see the data.previous_attributes hash is showing that destination_details.card had two nested values updated; reference and reference_status.
https://docs.stripe.com/api/events/object#event_object-data-previous_attributes

sudden hazel
#

Gotcha

#

Thanks

torpid ridge
#

Any time!