#newt-connect-dispute

1 messages · Page 1 of 1 (latest)

queen karma
#

hello, no I don't think the Transfer is reversed automatically.

zinc aspen
#

Mmmmm

#

Then I may be doing something wrong

#

🙂

#

Here's what I am doing:

#
  1. Creating a token using CC 4000000000000259
#
  1. Creating a customer and setting that token as the default one
#
  1. Creating a payment intent that is automatically captured on creation. Because of the CC we are using, the dispute is automatically issued.
#
  1. When receiving the charge.dispute.funds_withdrawn event, we are extracting the charge id from data.object.charge
#
  1. We retrieve the charge using that charge id.
#
  1. We extract the transfer id from the transfer field of the retrieved charge.
#
  1. We try to create a reversal for that transfer.
#
  1. We are getting the following error:
#
{
  "error": {
    "message": "The transfer tr_3JaMcSLNS7fsUd0U1CfZE3Iu is already fully reversed.",
    "type": "invalid_request_error"
  }
}
queen karma
#

ah gotcha, thanks for walking through that, lemme check

zinc aspen
#

We are using application_fee_amount on our payment intents

#

In the case depicted on that graph, it looks like the transfer on the charge object is the transfer to the connected account.

#

that's the one we are trying to create a reversal for, but when trying, we get the error.

#

You know what, I think I may know what is going on

#

I am using an account that has some webhook handler logic already attached to it

#

that's why this is getting reversed: not because Stripe is reversing it automatically but because that other logic is reversing it

queen karma
#

yeah some python code reversed the Transfer

zinc aspen
#

Yes

#

Let me disable that and verify once more

#

thank you