#jerz

1 messages · Page 1 of 1 (latest)

random coveBOT
tawny moon
#

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.

remote apex
#

ah ok. Does charge.refunded only get created on successful refunds or for all?

tawny moon
#

or rather Occurs whenever a refund from a customer’s cash balance is created. as the API ref says

tawny moon
#

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

remote apex
#

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)

tawny moon
#

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

remote apex
#

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

tawny moon
#

you're right, that is a really messy integration unfortunately

remote apex
#

ok, thanks

#

I think that's it for the moment!