#Nacho (Ignaxio)

1 messages · Page 1 of 1 (latest)

muted kelpBOT
solar rain
#

this has a message saying that refund state is successed and refunded flag is false.
Could you elaborate on this part? And give us the event id? evt_xxx

brazen sentinel
#

evt_3LiNRWC4xNOVLK7x1BQuNDH5

solar rain
#

Ah okie so in this case it's failed because it's a partial refund

#

refunded boolean
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.

#

In this case you can be confident that Charge has been partly refunded, and that part refund was succeeded, by looking at the Refund block inside the Charge object

"refunds": {
        "object": "list",
        "data": [
          {
            "id": "re_3LiNRWC4xNOVLK7x1DRBeT34",
            "object": "refund",
            "amount": 2399,
            "balance_transaction": "txn_3LiNRWC4xNOVLK7x1sQp4qe6",
            "charge": "ch_3LiNRWC4xNOVLK7x1JQ2Ecxl",
            "created": 1663269792,
            "currency": "eur",
            "metadata": {
              "env": "development",
              "refund_id": "11"
            },
            "payment_intent": "pi_3LiNRWC4xNOVLK7x1HksNUST",
            "reason": "requested_by_customer",
            "receipt_number": null,
            "source_transfer_reversal": null,
            "status": "succeeded",
            "transfer_reversal": null
          }
        ],
        "has_more": false,
        "total_count": 1,
        "url": "/v1/charges/ch_3LiNRWC4xNOVLK7x1JQ2Ecxl/refunds"
      },
brazen sentinel
#

Yes...! I had misunderstood the meaning of the refunded flag

#

thanks for that

#

but... How can I do to know that this refund (re_3LiNRWC4xNOVLK7x1DRBeT34) is really pending and it will be rejected later...?

#

Because a few minutes later I get another webhook (charge.refund.updated) that changes the status of the refund to failed.
How can I know that the webhook (charge.refund.updated) will arrive when I receive the first webhook (charge.refunded)?

solar rain
#

Did you have another charge.refund.updated event after evt_3LiNRWC4xNOVLK7x1BQuNDH5 ?

brazen sentinel
#

yes...

solar rain
#

Can you give the event id?

brazen sentinel
#

evt_3LiNRWC4xNOVLK7x1rC4MjE7

#

I need to do some things in my system only if the refund is successful, and do nothing if it fails. (thanks a lot for your time!!)

solar rain
#

You used this card, right?

brazen sentinel
#

Yes! Exactly"

solar rain
#

What I can say is that case can happen and unfortunately we don't have any property to forsee it. It seems depends on how the card network and the issuing bank deal with the Refund in their system.

#

But it's a reasonable question. You can try asking Support if they have further knowledge about refunding and funds flow

#

Despite I have a feeling it's just how it works

brazen sentinel
#

ok... I'll try

#

Thank you very much anyway. You have been very helpful to me. I thank you

solar rain
#

np and good luck!