#newt-connect-dispute
1 messages · Page 1 of 1 (latest)
Mmmmm
Then I may be doing something wrong
🙂
Here's what I am doing:
- Creating a token using CC 4000000000000259
- Creating a customer and setting that token as the default one
- Creating a payment intent that is automatically captured on creation. Because of the CC we are using, the dispute is automatically issued.
- When receiving the charge.dispute.funds_withdrawn event, we are extracting the charge id from data.object.charge
- We retrieve the charge using that charge id.
- We extract the transfer id from the transfer field of the retrieved charge.
- We try to create a reversal for that transfer.
- We are getting the following error:
{
"error": {
"message": "The transfer tr_3JaMcSLNS7fsUd0U1CfZE3Iu is already fully reversed.",
"type": "invalid_request_error"
}
}
ah gotcha, thanks for walking through that, lemme check
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