#9527xiaobei_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/1222803957366128771
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
why did you expect to receive a charge.refund.updated exactly?
you mean the status of the charge changed, but you didn't get the event?
Because successful or failed refunds can be processed through the charge.refund.updated event
There is no information about refund in charge.refunded, which is very confusing.
they can, yes. but many refunds will never be updated, and in this case we won't send the charge.refund.updated event.
Yes, I have a refund I didn’t receive charge.refund.updated
like the refund you shared had status: succeeded when you created it. and it's still succeeded. so nothing was updated, which means no charge.refund.updated event was sent (as expected)
re_3OyxwPH6KGNmuPs61iWY9pfT Why was this refund sent?
charge.refund.updated
This refund was first sent charge.refunded event and then
charge.refund.updated event
not sure, having a look
This refund is full, and the previous price difference refund is partial.
I'm not sure if it's because of this
But when I am in test mode, partial refund will also send charge.refund.updated
In test mode, the refund ID is: re_3Oz8c3H6KGNmuPs60yDH5NUs. This refund is sent with charge.refund.updated event.
looking at re_3Oz8c3H6KGNmuPs60yDH5NUs, here's the charge.refund.updated event: https://dashboard.stripe.com/test/events/evt_3Oz8c3H6KGNmuPs60q4jsSL4
there you can see in the previous_attributes what exactly changed that triggered that event
for re_3Oyv9TH6KGNmuPs600y3nWew, nothing changed, so there's no charge.refund.updated. to me that looks expected.
https://dashboard.stripe.com/events/evt_3OyxwPH6KGNmuPs61KiKStQj But there is no information in previous_attributes of this event
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Refund ID: re_3OyxwPH6KGNmuPs61iWY9pfT
@rain caveHi
OK
Okie so evt_3OyxwPH6KGNmuPs61KiKStQj is the only event for re_3OyxwPH6KGNmuPs61iWY9pfT, it was fired after the refund was created
That's what I see
No, there is a charge.refunded event for this refund: "evt_3OyxwPH6KGNmuPs61w7rYaI5"
There is another question, why is there no refund ID in the charge.refunded event? How should I handle my refund based on this incident?
why is there no refund ID in the charge.refunded event
Because that's a Charge object. In contrast tocharge.refund.updatedwhich is a Refund object
And yes there were 2 events, sorry. Each of them returns different objects here
OK, so if some refunds do not send the charge.refund.updated event, how should I handle the refund? How to find out which refund is due
I received the charge.refunded event before. At that time, there was a refund object in the object. I don’t know if the Stripe version has been updated.
Or do you need to add something extra?
Hmm I am a bit confused. On the example above we have both charge.refunded and charge.refund.updated. Are you referring to some other scenario where you didn't receive charge.refund.updated?
Yes, I have a refund that I didn't receive in the charge.refund.updated event
Refund ID: re_3Oyv9TH6KGNmuPs600y3nWew
Hmm that's like no events at all?
No, the charge.refunded event is sent, but there is no refund ID in this event, and my system cannot process the refund.
Okie in that case, can you try https://docs.stripe.com/api/refunds/list and passing in the Charge Id?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I think this is not a best practice. The refund ID should be returned in the refund event.
yeah I agree there should be a charge.refund.updated but not sure why it wasn't fired. Just as a backup, can you try the API above?
By the way, this is a partial refund
Is it because of a partial refund that charge.refund.updated will not be sent?
You can see this screenshot, there is only charge.refunded event, no charge.refund.updated
There is currently only one partial refund, but in test mode I received charge.refund.updated
Do you mean you receive and not receiving charge.refund.updated differently on Test mode vs Live mode, for partial refund?
Let's take a step back and list down what we know
Yes, in test mode, partial refunds are also received charge.refund.updated
Look this
Stripe background shows that 2 events were sent, which is a partial refund.
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
OK
Could you briefly summarise the latest question for me please?
OK
I did not receive the charge.refund.updated event for a refund. The refund ID was: re_3Oyv9TH6KGNmuPs600y3nWew. Only the charge.refunded event was sent. All other refunds received charge.refund.updated.
This is the one in the screenshot. You can see that Stripe only sent the charge.refunded event.
Is there some exception in Stripe that caused it not to be sent?
We are not aware of one, let me check...
OK
I just made another partial refund, but I didn’t receive charge.refund.updated. It seems that charge.refund.updated will not be sent for partial refunds?
Could you please paste the PaymentIntent ID here?
pi_3OzErqH6KGNmuPs60g8a4ktK
To clarify, a charge.refund.updated is not always sent
Why
There is no refund object in the charge.refunded event. How to handle the refund callback?
Sent when the refund is updated. Updates include adding metadata, refunds failing, and providing details like the ARN as a reference number to trace refunds.
I'd guess in the example you shared where you receive acharge.refund.updatedevent thestatusfield transitionspending->succeeded
Where as the partial refund is immediately succeeded : https://dashboard.stripe.com/events/evt_3OzErqH6KGNmuPs6005pJvls
It's likely just an intricacy of test mode
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So because the partial refund succeeds immediately, the updated event will not be sent, right? If it is a full refund, the updated event will be sent
As I said this is likely just a quick in the test mode behaviour
Can you share a evt_xxx ID for a charge.refund.updated?
"evt_3OzFYuH6KGNmuPs611diQRtt"
OK, the critical difference is that re_3OzFYuH6KGNmuPs61puoXHW1 was updated to include tracing details so we sent a charge.refund.updated event as per the docs:
Sent when the refund is updated. Updates include adding metadata, refunds failing, and providing details like the ARN as a reference number to trace refunds.
I guess the partial refund wasn't updated to include those tracing details as they weren't provided by the bank/issuer, so we didn't update the refund (and no event)
If so, which event should I listen for to handle the refund?
There is no refund ID in the charge.refunded event, so it is troublesome to handle the refund callback.
Depends what you mean by handle the refund. But the recommendation is outlined here: https://docs.stripe.com/refunds#refund-webhook-events
Correct, you'd need to look up the Refund object itself: https://docs.stripe.com/api/refunds/list#list_refunds-charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.