#rafaelbaptista-disputes
1 messages · Page 1 of 1 (latest)
👋 happy to help
Disputes usually come directly from the issuing bank
Submitting the evidence on the other hand is something that the Platform should handle and not the connected account
Right, what i'm asking is this:
From what i read the platform is the one responsable to submit the evidences on the disputes. But on our system, in some cases the connected account is the one that have the evidence (for example: if the product as delivered or not,...) .. so what i was asking if stripe allow connected accounts to submit evidence insted of the platform
Another question that i have is on the payments part. I'm using destination charges and when a payment is made on my platform i store the chargeid on the database so i can know what charge on stripe is associated with the checkout .. The problem is, when listing the charges i dont get the ch_ but the py_ so i dont have a way to link it to my system checkout
Submitting the evidence on the other hand is something that the Platform should handle and not the connected account
since the Payment was initially created but the Platform (as a Destination Charge)
so what i was asking if stripe allow connected accounts to submit evidence insted of the platform
in that case you could do something in your Platform's application to let the Connect Account know about the dispute and submit to you the evidence which you would eventually submit to the Stripe API on their behalf afterwards
how can i list to the connected account only the disputes of that connected account? When i try to list the disputes of a connected account i allways get the disputes of all my connected accouunts, witch parameter should i use to fitler disputes per connected account?
unfortunately today there is no way of filtering this
so if i want to show the disputes to a particular connected account i would have to list all of the disputes of the platform?
The only what that i saw to accomplish this is do a get of all the charges and then use the charge id to filter the disputes in a loop, that way i only get the disputes of the charges associated with that connected account
honestly I don't know that, but I'm trying to get you an answer
okok, thank you
also after that please let me know something regarding this.
Another note on this subject .. the py_ charge originated by the ch_ dont get any information of the checkout i pass
Im using the destination charges (transfer data with on_behalf_of
what do you mean by py?
yes sorry
do you need more information ?
no sorry, basically in order to filter the disputes you could list them all and expand on payment_intent and then filter on the transfer_data.destination
when i do expand from the payment_intent i get no info
$disputes = \Stripe\Dispute::all(["limit" => 999999],["expand" =>["payment_intent"]]);
one of disputes is working but the one that was originated by the test payment card for disputes is not showing the payment intent, can you help me?
could you give me the dispute id ?
of course, is this one dp_1KuZvpCRI4H2eNZZXB8dEmzU
this one was created by the old Charges API and not the PaymentIntents API
you can expand on data.charge as well
yes our system is on the old api version, is that a problem?
let me try
yes our system is on the old api version, is that a problem?
no
I would recommend moving to Payment Intents but it's up to you
alright, thanks
to do the filter of the transfer_data.destination do i have to do it manually with a loop or stripe api lets me filter that property ?
unfortunately you'll have to do it manually
allright no problem, regarding the other question that i ask, you were able to find an answer?
which one please?
this one
the py charge originated by the ch dont get any information of the checkout i pass
I don't think I got your question, could you please elaborate?
no problem i'll explain and give you contest so you can understand.
So on my system i'm using destination charges. When i make a checkout on my system i save allways the charge id on db linked to that checkout ( that charge id is starting with ch_).
But when i'm listing all the payments to the connected account i only get ids that start with py_ and not the charge id that was previusly linked on my internal checkout
side note : (what is the correct way to retrive the charges of a connected account, using secret key from platform and stripe-account header with connected account id?
But when i'm listing all the payments to the connected account i only get ids that start with py and not the charge id that was previusly linked on my internal checkout
because you're listing all the Payments and not all the Charges
sorry i call the charges payment sorry for confusing you
\Stripe\Stripe::setApiKey($strPrivate);
$invoices = \Stripe\Charge::all(["limit" => ($this->input->get("length")>0 ? $this->input->get("length") : 999999)]);
how can i get that information?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
found it, was on different timezone
req_XAx0pYUWk74RX4
version Stripe/v1 PhpBindings/6.43.1
could you please send me the response message you get? just one charge would be enough
do you have an example of a ch_xxx that you're not able to see in the list?
yes, this is the last checkout that i made on my system, the charge id that was save on database was this one : ch_3KuaYcCRI4H2eNZZ060CnkvR
are you using your Platform secret to get all of the Charges? or you're using the Connect Account's secret key?
I'm using the connect account secret key
there you go, here lies the problem
so to explain it simply, the idea is when you create a Destination Charge, the charge is created on the Platform's account, but the Platform is also paying a cut to the Connect Account, which means that a Charge object ch_xxx will be created on the Platform's account data and a Payment object py_xxx will be created on the Connect Account
so when you're using the secret of the Connect Account you're asking for all the payment that this account has received, which technically are the payments the platform has sent.
So when listing the payments to a connected account should i List the charges or the payments sent by the platform?
you need to list them on the Platform account and then use the transfer_data.destination to filter on the account
for the time being it's the best way to keep track of the ch_xxx ids you store in your db
So to reflet also the correct information to show to the connected account i should use also the amount of the transfer data insted of the global amount of the charge since that is the amount paid to the platform... Is this correct?
Should i also store the payment id when a check-out is made? If yes how can i get that info when a charge is made
Should i also store the payment id when a check-out is made?
Do you mean thepy_xxxfor the Connected Account?
yes sorry, is exact what i ment
So to reflet also the correct information to show to the connected account i should use also the amount of the transfer data insted of the global amount of the charge since that is the amount paid to the platform... Is this correct?
yes
Should i also store the payment id when a check-out is made?
no need I guess
its possible to know if that charge was already paid to the connected account?
you could expand on the transfer https://stripe.com/docs/api/charges/object#charge_object-transfer object and you can see the status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
$invoice = \Stripe\Charge::retrieve($this->uri->segment(4), ["expand" => ["data.transfer"]]);
is called this way? seems that the transfer object dont expand when doing this
sorry I might have been wrong, I'm trying to figure this out just give me a second please
alright, no problem thanks
ok so what you need to expand on is basically the balance_transaction (without using data. because you are retrieving only on Charge vs when you expand on a call that retrieves a list, then you'd need to add the data.)
if the balance_transaction.status is available then the Connect Account has received the money on their Account
can you give me the ch_xxx you're using?
yes, is this one: ch_3KuZumCRI4H2eNZZ1Tq4uxwQ
the code using to retrive the charge is like this
$invoice = \Stripe\Charge::retrieve($this->uri->segment(4), ["expand" => ["balance_transaction"]]);
because this charge didn't succeeded (card_declined)
ok , this one is succed ch_3KuaYcCRI4H2eNZZ060CnkvR but the expand is not working
only get this : [balance_transaction] => txn_3KuaYcCRI4H2eNZZ0bY5ujek
using the same code you sent earlier?
Yes
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this is weird
is my code correct ?
$stripe->charges->retrieve(
'ch_xxx',
['expand' => ['balance_transaction']]
);
normally it is
yap that is exaccly what i'm using :
I don't know if there's a bug in the version of PHP you're using
but could we try to expand on another field? let's try customer and see
I think there's a bug in the version you're using
from what i'm seeing on the sdk the second parameter where we are passing the expand is only used to pass things like this
i dont think there is a way to expand the object when retriving a charge by id
can you confirm this
I'm trying to find how to expand in your case, one second
ok, thank you
by the way, you can use the new Search API https://stripe.com/docs/api/charges/search?lang=php to filter your charges by transfer_data[destination]
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can i use this with the version of the sdk/api that im using?
what's the version you're using?
i belive is this one: version Stripe/v1 PhpBindings/6.43.1
the latest version is v.7.125.0
I don't think the search is available for your SDK and most probably for your API version, but you could use the newest API version for this call in particular
you mean insted of the sdk use curl to make the call?
but this call of search that you are refering to was to insted of doing that manual filter of the transferdata . destination in a for loop replace that with this new search api call?
but regarding the other matter of expand to know if the charge was paid already to the connected account were you able to get more information on that?
you mean insted of the sdk use curl to make the call?
no
but this call of search that you are refering to was to insted of doing that manual filter of the transferdata . destination in a for loop replace that with this new search api call?
yes
but regarding the other matter of expand to know if the charge was paid already to the connected account were you able to get more information on that?
still looking at it
it seems that this is a limitation of the version you're using
I would strongly advise you upgrading to the latest PHP version
for now i think i would use the sdk with that manual filter that you told me, that is also a correct way to do it right?
the problem is, we have a big system based on that "old" stripe version of the sdk
and i dont know exacly what would break if we do upgrade to the new version
you could take a look at this https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md
for now i think i would use the sdk with that manual filter that you told me, that is also a correct way to do it right?
yes
if you can't expand you'll have to retrieve the balance_transaction with a separate call
theres no way to do that expand on older versions?
on the list yes
on the retrieve I'm afraid not
Just a curious question, why are you retrieving the Charge?
since you're getting all the Charges from the list, you don't need to make a separate calls to retrieve individual Charges
alright sounds good, this solve the problem
because i list all the charges on the table but then the user have a detailed view of the charge
thats why i need to do the charge::retrive
yeah you're right, in that case you'd need to make a few extra calls
to retrieve the information of the expandable fields
would love to simplify the process ahah but seems that this is the only way ( retrive the charge first and after the balance transaction)
I think I found a way for you to do that
could you please test this?
\Stripe\Charge::retrieve(['id'=> $this->uri->segment(4), 'expand' => ['balance_transaction']]);
@serene abyss did it work?
srry didnt get the discord notification, let me try 1 sec
tyt
you are the men, it worked
so in order to use expand on call were i retrive by id, i should allways put the id with that key "id" and then the expand array
my bad as well, sometimes between versions things change and it might generate confusion
yes
dont worry, thank you so much for the assitance
let me know if you need any more help
I might not be around so I will close this thread and if you need anything else you could always ask on the #dev-help channel
will do , thanks again ..
it its possible leave open, that way when i have questions i can ask them were and have my questions in one place