#ss2021-refunds
1 messages ยท Page 1 of 1 (latest)
๐
so the follow up would get an event, yes, when the state changed
i don't think the initial request would get one as you would know this in the API response, its not updated per se, but trying to see if i can test
do you know what specific event would get fired?
The one you said, yea: charge.refund.updated
oh okay
so if the refund goes straight to a successful state (skips pending state) then the charge.refunded event will fire but if goes to pending state then successful state then charge.refund.updated will fire instead correct?
Oh sorry, i've got this mixed up. Disregard and let me review.
ok
Going back, yes what i said before is true for eg card refunds that go pending because of an insufficient balance
It doesn't apply to normal ACH refund, which are described here and only get an updated event if they fail for example due to an invalid account: https://stripe.com/docs/ach#ach-refunds
okay..
?
Hello! @acoustic yarrow had to step away, let me get caught up...
Are you asking specifically about ACH payments or other methods of payment as well?
Going back to your original questions:
When the status of a refund on a charge goes into the pending state does the
charge.refund.updatedweb hook event get fired?
It will fire if the refund fails. See here for details: https://stripe.com/docs/refunds#failed-refunds
And once that pending refund succeeds (going from pending state to successful state), what web hook event is fired?
charge.refund.updated?charge.refunded? some other event?
If the refund succeeds charge.refunded will fire.
so if the refund goes straight to a successful state (skips pending state) then the
charge.refundedevent will fire but if goes to pending state then successful state thencharge.refund.updatedwill fire instead correct?
This is correct, yep.
card payment
oh okay cool
Actually, wait, I think I misread...
but how about the case it doesn't fail, just stays in pending e.g. insufficient funds until the enough funds are added to the account
so if the refund goes straight to a successful state (skips pending state) then the
charge.refundedevent will fire
This is correct.
but if goes to pending state then successful state then
charge.refund.updatedwill fire instead correct?
If the refund succeeds you'll get charge.refunded: https://stripe.com/docs/api/events/types#event_types-charge.refunded
Not sure what you mean about it staying pending? Can you give me an example scenario?
e.g.
https://support.stripe.com/questions/pending-refunds-due-to-insufficient-funds-or-stripe-balance
In the event you issue a refund to a customer that results in a negative Stripe balance, the refund will show as โpending.โ
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Right, but I don't understand your question about that?
so would the charge.refunded event fire if a refund with status of pending then succeeds
or would charge.refund.updated run since the status value is being updated from pending to successful
or perhaps both?
๐ Hi @verbal stone I'm just hopping in since @grave bronze has to step away, give me a minute to find the answer
From my understanding the charge.refunded event will be fired when the refund is created (even if it's pending). When it transitions to successful we do not send an additional event.
If it transitions to failed, then we do send a charge.refund.updated event