#MarcusStripe

1 messages · Page 1 of 1 (latest)

torn hatchBOT
snow vector
#

Hi there!

#
  1. You can know if a charge was disputed with the disputed boolean. Then you would list disputes while passing a charge ID https://stripe.com/docs/api/disputes/list
  2. I'm not sure I understand your question. Can you try to clarify?
robust radish
#

ok maybe some background - I am working on an affiliate program, so I am sending commissions (stripe connect) to my affiliate partners.
The commission is 30% of the payments received from the "normal" subscription customers.

Currently I am listening on the invoice paid event and then calculating 30% of that.
Additionally I am listening on the credit_note.created event and whenever such event is send, I am substracting this amount from the amount to be paid out..
But that seems like a bad approach, so I am now working on a different way -
Using the payment intents api and once montly or even once daily or whatever, retrieving all
Charges of a given customer, plus all refunds.
Now there could also be disputes... and those are very difficult for me...
A refund means - money IS refunded. period.
But a dispute? I think it starts with "someone has a dispute".. so now there is like a transition period.
In case of "disputed" true - should I remove the charge, or "pause" it?
(When) should I "release" the charged-amount again, and when should I cancel the charged amount ?

This is what I am trying to find out.

#

and so I am looking on the dispute api

snow vector
#

So you are manually computing how much to send to the connected account, and you don't want to include money from disputed charges?

robust radish
#

for the first part - yes.

#

for the disputes.. I am unsure how to handle them, really

#

because, to my understanding a dispute is like a "case".. the outcome is unsure

#

so it might be best to PAUSE (temp exclude) those amounts until either its clear to add or remove them

#

sorry very confused here

snow vector
#

Also a dispute could happen after you made the transfer to the connected account, correct?

robust radish
#

given that disputes can be done up to 120 later, yes, I guess so

#

😦

#

which makes all even worse

#

then I would need some way to take back money which I had already paid... or just life with the fact of having lost money

#

in the hope that would be the RARE exception to the case

#

not even sure if a dispute would happen often enough to even consider it

#

given the fact that I dont steal people's money... a dispute could only have 2 reasons - a customer trying to cheat me - so I would probably / hopefully win the case - or some weird bug in my code... but that would be rare enough to just accept some lost money, I assume

#

so maybe I shold not even consider disputes at all.. unsure...

snow vector
#

Yes it can be a little difficult to handle. But here's what I would recommend:

#
  • For payments you haven't transferred yet. If you receive a dispute, keep the funds. And only transfer the funds if/when the dispute is status:won
  • For payments you already transferred. If there is a dispute, and the status is status: lost, then next tiem you do a transfer subtract that amount to the connected account.
#

And to keep track of the status of refunds, listen to the webhook events.charge.dispute.created and charge.dispute.updated

robust radish
#

for the "won" case - will the "disputed" flag still be true?

#

so would I check - if disputed & NOT won?