#jerz
1 messages · Page 1 of 1 (latest)
hi! yeah that is the correct event. refund.created is actually only created in a specific circumstance for a specific payment method(refunding an unlinked bank transfer I think), it's quite confusing. But charge.refunded is the correct event.
ah ok. Does charge.refunded only get created on successful refunds or for all?
or rather Occurs whenever a refund from a customer’s cash balance is created. as the API ref says
well depends what you mean. It happens when the object is created
refunds if they fail, don't fail immediately, they fail async with a charge.refund.updated event. The other 'failure' mode is they are created but not processed immediately(they are in status:pending) if e.g. you have a negative balance , but the event still happens since the object was created
ok, in the charge.refunded event I get given the charge. How do I know which refund it was created by (in the case of multiple refunds)
not sure what that means
you have a charge ch_xxx. There can be multiple refunds re_xxx
but yeah the design is hard now because we don't include the list of refunds in the Charge object anymore so it won't be in the webhook
if I create a refund for the same payment intent multiple times (because I've done multiple partial amounts) how can I tell which refund the charge.refunded event is related to?
ok
I think you just have to do https://stripe.com/docs/api/refunds/list#list_refunds-charge when handling the webhook and it's the first in the list(the most recently created)
you're right, that is a really messy integration unfortunately