#BruceWayne
1 messages · Page 1 of 1 (latest)
Webhook judges which type is the refund completion, and then gets the refund object?
You may listen tocharge.refundedevent and check for its status.
However, in the rare instance that a refund fails, we notify you using the charge.refund.updated webhook event. You’ll then need to arrange an alternative way of providing your customer with a refund: https://stripe.com/docs/refunds#failed-refunds
charge.refund.updated will only be sent when there is an unexpected refund failure at the issuer side some time later. You should also listen to charge.refunded that will be sent for all refunds
If the refund is successful, I should listen to charge.refunded, right? instead of charge.refund.updated
Your system should listen to both. charge.refund.updated (refund failure) can still be sent after charge.refunded (successful refund) for unexpected circumstance
Is there a problem with our developers' code?
Hi there, I'm taking over.
The data you get from the charge.refunded event is a charge, not a refund.
What should I do to get the successful refund message from charge.refunded?
As river mentioned. You should listen to both charge.refunded and charge.refund.udpated event.
If the refund is succeeded immediately, you'll receive a charge.refunded and its refunded is true (if it's a full refund).
If a refund needs time to process, its status would be pending first, and you'll get update of the refund through the charge.refund.udpated event.
Is the code I posted just now ok? Any questions?
charge.refunded is useless, the refund will be sent as soon as it is created, and the refund object cannot be converted
Can you guys give me an example of listening for refunds, our technicians will follow your instructions
Can you share wtih me the complete code? The implementation of charge.refund.udpated is cut off.
Please wait for me, the technicians are eating,