#david2 - refund webhooks

1 messages · Page 1 of 1 (latest)

summer crag
#

hi there!

#

each refunded charge should have a separate charge.refunded event

slow rivet
#

yes, and on the first refund and webhook receipt I will certainly get a charge object in the webhook that contains only 1 refund obj (i.e. charge.refunds.data.length === 1

But, on the second refund, in the webhook, will charge.refunds.data.length === 2 ? If so, are they ordered chronologically?

summer crag
#

just tested this quickly. it looks like the latest/most recent refund will be the first in charge.refunds.data

slow rivet
#

curious if webhook retries would change that, or they always retry to send exactly the same data as their first try?

summer crag
#

retries would try to send the exact same data

slow rivet
#

i don't see it in the api docs, but it seems like the implication is that charge.refunds.data[0] is "the refund that triggered this webhook", would be nice if that was an api guarantee

summer crag
#

yep, i can see the use case for such a guarantee