#mordiantiable_refund-events
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/1296148063831851082
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! charge.refunded is created when a Refund is created, and charge.refund.updated is created when an existing Refund is updated.
It's possible for a Refund which has succeeded to later fail. This is rare, but it does happen from time to time. See here for details: https://docs.stripe.com/refunds#failed-refunds
Do we always receive a charge.refund.updated event for a refund, or is it possible for a charge.refunded event to have a status === succeeded without ever triggering a charge.refund.updated event?
The latter. Most commonly you'll only get charge.refunded and never get a charge.refund.updated.
The exception to that would be if you added metadata to the Refund. That would also trigger a charge.refund.updated Event.
Oh, that make sense. Every time we update the refund, we would get the charge.refund.updated with success, I think (?)
This is so helpful @dawn sparrow ! Thank you so much.
Happy to help!
curious about "The exception to that would be if you added metadata to the Refund. That would also trigger a charge.refund.updated Event." - This would cause charge.refund.updated to fire every time, even if the metadata is added on initial creation?
No, it would only fire if you add metadata after the Refund was created.
If you create a Refund and add metadata during the creation request you'll only get a charge.refunded Event.
Basically charge.refunded fires when a Refund is created, and charge.refund.updated fires when an existing Refund is updated. The former is common, the latter is usually rare.
Thanks Rubeus!
Happy to help!
One more question. Is there a chance that charge.refunded gets called with status: pending?
Yep.
Can you give an example?
Usually it's because a Refund is created for an amount your available balance can't cover, so the Refunding is marked as pending until you have enough funds to cover it.
Ok, that makes sense. So let me describe our entire situation to you to see if you agree on our logic:
We initiate a reverse payout whenever a refund is successful. It sounds like we want to listen to both charge.refunded and charge.refund.updated and check status:succeeded. Whenever the first one occurs, we kick off the reverse payout. If the other one happens after, we ignore because we already initiated the reverse payout.
I mean... if a succeeded Refund later fails, what do you want to do with those funds? It sounds like you're not accounting for the refunded amount returning back to your balance?
We would deal with that manually for now. The reason being is because we don't receive an event from Stripe when the funds of the refund arrive to the parents.
Parents?
We are under the impression that we would only receive a "failed" event if the refund failed on the way to the bank. But we don't receive a "refund didn't make it to the bank even though it was sent successfully" event. Is that correct?
Sorry, I meant to say
No, that's not correct. I recommend you read through the Refunds documentation I linked to above in detail.
But we don't receive a "refund made it to the bank successfully" event. Is that correct?
I'm also not sure I understand what you mean when you say you don't get an Event from Stripe when the refund funds arrive to the "parents"? Who are the "parents"? Are you talking about when refunded funds come back after the Refund fails, or something else?
Sorry, parents are who are refunding in our app.
So here's my question:
- We start a refund
- We get status:succeeded
- 5-10 days later it arrives at the parents bank
- do we get a Stripe event that notifies us that it made it into the parents bank account?
No.
Ok, thats what we thought
But, we do receive a failed event in that 5-10 day process, for ex, if their bank account is closed
Ok, good
So my next question would be - you said "Usually it's because a Refund is created for an amount your available balance can't cover, so the Refunding is marked as pending until you have enough funds to cover it."
Are there any other situations this could occur?
I don't think so.