#gerson3397
1 messages · Page 1 of 1 (latest)
charge.refunded would be triggered when the refund is created and charge.refund.udpated would be triggered if the refund eventually fails/some other update to the refund occurs
OK, I got it. But when can I assume that the refund was completed successfully? I have these 2 payments:
1 - pi_3NLnPXG3FLzlF9jA0VemezCk
2 - pi_3NRiwtG3FLzlF9jA1rt6hZlV
The payment number 1 has only the event charge.refunded and the payment number 2 has both of the events - charge.refunded and charge.refunded.updated.
I've subscribed my webhook to listen just the charge.refunded.updated assuming that the refund it is confirmed when I got this event. But sometimes I get only the event charge.refunded and the payment gets refunded anyway. How can I be sure?
So the first Payment Intent is for a card - the vast majority of card refunds succeed so when it's created we mark it initially as successful and would send a follow-up charge.refund.updated event within 30 days if something goes wrong and we need to later mark it as failed
for the second Payment Intent it's for pix (non-card) so we initially create the refund as "pending" and update it to successful
So, when the payment method is 'card', I can assume that the event 'charge.refunded' is a success already. When it's PIX, I have to wait for the 'charge.refunded.updated'. Is that right? There is no single event which I can rely on to be sure that the refunded was completed?
That's correct