#rafaelbaptista-disputes
1 messages · Page 1 of 1 (latest)
yes thats correct
Yeah there is no way to do this without listing all disputes or charges and then filtering.
You might be able to use the Reports API thought to grab this info
Let me check on that
how about this https://stripe.com/docs/api/charges/search
»
Ah yes the Search API was just released recently and might work great here actually
i dont have the last sdk update so i have to use curl i guess
dispute isn't a field though
This would be great if you added metadata yourself, but it doesn't look like there is a way to just search disputes here
damn so that is the only way to do it? query eveything, so if the platform have 1milion records i will have to query all to get the connected acount charges ?
what you mean by this?
If you already had metadata on the objects that differentiated them by Connected Account then you could use that with the Search API
but in the case of the dispute is impossible since they are created by the bank for example
on custommers, charges, disputes i can add the coonected account id to the metadata
and also disputes is not present on this new search api
Woops, missed the followup, sorry!
Hmm yeah I don't think the Search API will work here
so stripe dont provide a better aproach for this?
I think the Reports API is potentially a better approach
That is what I mentioned above
because listing 1milion charges or disputes or whatver and then filter manually with a loop is not really good
could you please send me the link
Oops sorry, thought I did. https://stripe.com/docs/reports/api is the overview. I believe one of the Connect platform reports is what you want, though haven't looked for what one in particular would satisfy your use-case: https://stripe.com/docs/reports/report-types#connect
Also, Sigma would allow you to easily do what you are looking for
But not sure if you want to use Sigma or not.
let me check
i dont know if i mention but we are using express
just look into that, and that is not what we are trying to accomplish
we are using our dashboard to create a page for the disputes, payments and custommers ( if i find a way to filter per connected account)
so basically i need the endpoint to allow me to filter that per connected account on the request insted of listing everything and then filter
Yeah that's not possible right now. The disputes are on your platform and aren't directly associated with the transfer. You would need to list disputes and expand the charge.
You don't need to retrieve all charges
But there is no way to filter ahead of listing disputes
in the case of listing the charges i need to
Why? You just want the charges that are associated with disputes, no?
not i think you didnt understand
i will have a page to list disputes
another page charges
and if i find a way another of the custommers filter per connected account
Displaying charges is completely different here. You want to show the Express user their charges, right? Not the charges on your platform? For this you just list charges and pass the Stripe Account header so that you are just grabbing charges from that Connected Account.
This does not work the same with disputes. Since the disputes occur on your platform.
no because the charge created on the platform was originated by the connected account but have the destination then of the connected account
so i do have to list the charges of the platform
in order to know what are the fees, amount
and the amount transfered to the connected
Okay well in that case you shouldn't be using Express with Destination charges. You would use Standard with Direct charges. As noted, if you need the charges here from your platform, you need to list them and filter. There is no "list by Connected Account" for charges on your platform.
what you mean, was stripe that told us to use express with direct charges
when listing charges i cannot list the charges of the connected account since the checkout created on the system is the one on the charge created on the platform
Sorry, that didn't make sense to me. But it sounds like in this case the best thing for you to do here is to backtrack from your Connected Account. So you list charges on the Connected Account and expand the source_transfer (https://stripe.com/docs/api/charges/object#charge_object-source_transfer) and then expand the source_transaction: https://stripe.com/docs/api/transfers/object#transfer_object-source_transaction. That will get you back to the original charge on your platform.
can you elaborate on why dosent make sense so i can know your opinion on this»
Just the language here confused me.
The above though actually will solve your issue I think.... list charges on the Connected Account and backtrack
Then you can both get disputes and charges for that Connected Account
Without listing all charges
the expand is what im already doing to filter the charges / disputes per connected account, but the problem is that the filter is done manually checking the transfer_data account after query all the charges or disputes
This should have a way to be done on the call insted of being done after
ahh so i'm i thinking correct? regarding the charge parts interaction with platform/ connected accounts?
You are checking transfer_group because you are going platform --> Connected Account. I'm saying to instead go Connected Account --> platform. So you would list charges and pass the Stripe Account header of the Connected Account you want to list for. When you do this you also expand the source_transfer and source_transaction
1sec let me try this
how do i pass the ["stripe_account" => "{{CONNECTED_STRIPE_ACCOUNT_ID}}"]
in this call
invoices = \Stripe\Charge::all([ "limit" => 999999), "expand" => ["data.payment_intent"] ]);
https://stripe.com/docs/connect/authentication#stripe-account-header has a PHP example
i think i got it
$invoices = \Stripe\Charge::all([
"limit" => 999999),
"expand" => ["data.payment_intent"]
],["stripe_account" => $this->config->item("stripe_account")]);
the expand is
["data.source_transfer.source_transaction"]? is that what you meant?
Don't think you need data if I remember correctly
when doing the list all we do need to include data
ty, when abording the disputes, i can also take this approach?
With disputes I'd recommend just listing all disputes and filtering
If you use the above route, you can find out if a charge is disputed
But you can't get the dispute ID or info from that
hm so would have to use the initially method that i describe where i use the expand charge id object to filter de dispute on a loop, is that correct?
Yes that's correct.
regarding the custommers listing, i know that the custommers of every connected account will reside also on the platform but there is any way that i can identify them as list them per connected account?
I'd recommend going the same route that we discussed for charges. The charge will have a customer associated with it.
So if you backtrack then you can grab the customers that way and just deduplicate
what you mean by backtrack? You mean to do this i will have to retrive all the charges where i also expand the custommer and when for every charge of the connected account if the user is not on the temparray that i created i add the user to that array
is that what you meant?
Yep, sorry, "backtrack" in my mind just means go Connected Account --> Platform
So yeah, you handle whether a customer is associated with the platform charge after you list charges on the Connected Account and expand source_transfer and source_transaction. You can expand customer as well here.
ahah dont worry, i was just confirming
alright got it, list the charges and then get the custommer associated with the charge .. to expand the customer i only need to data.source_transfer.source_transaction.customer or do i need to add another position to the expand object?
after listing the custommers when the connected account clicks to see the details, can i also include a button for the connected account to delete the custommer or that is not correct to do it?
Yep data.source_transfer.source_transaction.customer
If you want to allow them to delete a customer you can.... but I would not recommend this.
You may want that data in the future. It can still be retrieved thereafter, but can't be actioned
But really, that is up to you
can you elaborate on the why? so i can understand
It mostly is up to you
It mostly comes down to whether you are going to ever want to perform actions with that Customer in the future.
If you know 100% that you aren't, then you can delete them if you so desire.
But if you were to for some reason offer a Subscription in the future, you would want to have that Customer and their paymentmethod to make it easy to do so.
But really this is up to you and your model
thank you for clarifying, when i was talking about the delete was reffering to give the possibiliti for the coonected account delete custommers that they want from the list
I've got to step away @bronze wasp, but @feral atlas is here if you have any follow up questions.