#boat_webhooks

1 messages ยท Page 1 of 1 (latest)

vestal juncoBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1308886840018993225

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

quaint garden
#

For a long time, we only handled charge.refunded to record the outcome of refund attempts in our system.
Last year, we noticed a gap and added code to handle charge.refund.updated as well to support cases where a refund fails initially due to a pending dispute, and then after winning the dispute we reattempt the refund and it succeeds.

Now, another gap has come to our attention where a charge is refunded successfully, then a customer disputes the charge, and we lost the dispute. In this case, we have seen a refund.failed event instead of charge.refund.updated.

lusty needle
#

Hello

quaint garden
#

We handle refund.created and refund.failed, but strictly for our unlinked refunds flow. Our code doesn't expect to receive those for charge refunds.

lusty needle
#

So if you want to know every state transition of a refund then you would listen for each of those events.

#

As you can see there, charge.refund.updated is marked as deprecated as we recommend using the other (newer) refund events.

#

However, we will still fire charge.refund.updated as before to maintain backward compatibility.

quaint garden
#

It's probably worth noting that we are on predominantly on API version 2020-08-27 ๐Ÿ˜…

lusty needle
#

These Events are not API version dependent

vestal juncoBOT
quaint garden
#

Just to be sure - would refund.updated only occur for scenario 2 and we should expect only refund.failed for scenario 1?

scenario 1:

  • we have a successful charge
  • we successfully refund that charge
  • then the charge is disputed
  • we lose the dispute

scenario 2:

  • we have a successful charge
  • the charge is disputed
  • we attempt to initiate a refund, but it fails since the charge is in dispute
  • the dispute is won
  • we re-attempt the same refund and it succeeds
outer dirge
#

Hi there. Not sure offhand

#

Recommend thoroughly testing in test mode