#CheckMate
1 messages · Page 1 of 1 (latest)
Thanks. Why is there no refund.suceeded webhook
Because there's no reliable way to track when the refund reaches the customers account.
You usually see "Your refund will return to your bank account within X business days" when you shop online.
But then why is there suceeded status for refund
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hi! I'm taking over this thread.
Async I see , nice
To keep track of refund status, this is what we recommend:
- Listen to
charge.refundedand mark the refund as successful - Also listen to
charge.refund.updatedand update the refund status accordingly if it changes
But charges is old api right ? also in charge webhook I should parse a charge endpoint.
We don't recommend directly creating Charges, because indeed this is an old API. But when you use PaymentIntent, there is a Charge object involved.
And a refund is associated to a Charge, that's how it works.
charge.refunded and charge.refund.updated will contain a Charge object, yes.
How do I get payment id from charge id
It's in the Charge object: https://stripe.com/docs/api/charges/object#charge_object-payment_intent
Note I was wrong earlier, charge.refund.updated will not contain a Charge object but a Refund object: https://stripe.com/docs/api/events/types#event_types-charge.refund.updated
😢
What's the issue?
Why can't it be just sent as refund.updated ?
Both the Charge object and the Refund object have a payment_intent property.
what is the difference between refund.updated and charge.refund.updated ?
refund.update seems to be about something different based on the description here: https://stripe.com/docs/api/events/types#event_types-refund.updated