#rafaelbaptista-disputes

1 messages · Page 1 of 1 (latest)

lofty trail
#

Hey there, are you using Destination Charges?

bronze wasp
#

yes thats correct

lofty trail
#

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

bronze wasp
lofty trail
#

Ah yes the Search API was just released recently and might work great here actually

bronze wasp
#

i dont have the last sdk update so i have to use curl i guess

lofty trail
#

Hmm actually

#

I don't think dispute is a field that you can search

bronze wasp
#

1sec will check that doc

#

how about using the search sintax

#

?

#

field:value

lofty trail
#

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

bronze wasp
#

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 ?

lofty trail
#

If you already had metadata on the objects that differentiated them by Connected Account then you could use that with the Search API

bronze wasp
#

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

lofty trail
#

Woops, missed the followup, sorry!

#

Hmm yeah I don't think the Search API will work here

bronze wasp
#

so stripe dont provide a better aproach for this?

lofty trail
#

I think the Reports API is potentially a better approach

#

That is what I mentioned above

bronze wasp
#

because listing 1milion charges or disputes or whatver and then filter manually with a loop is not really good

bronze wasp
lofty trail
#

Also, Sigma would allow you to easily do what you are looking for

#

But not sure if you want to use Sigma or not.

bronze wasp
#

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

lofty trail
#

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

bronze wasp
lofty trail
#

Why? You just want the charges that are associated with disputes, no?

bronze wasp
#

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

lofty trail
#

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.

bronze wasp
#

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

lofty trail
#

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.

bronze wasp
#

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

lofty trail
bronze wasp
lofty trail
#

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

bronze wasp
#

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

bronze wasp
lofty trail
bronze wasp
#

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"] ]);

lofty trail
bronze wasp
#

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?

lofty trail
#

Don't think you need data if I remember correctly

bronze wasp
#

when doing the list all we do need to include data

lofty trail
#

Ah yes right

#

That is necessary for lists

#

Yes that looks right

bronze wasp
#

ty, when abording the disputes, i can also take this approach?

lofty trail
#

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

bronze wasp
#

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?

lofty trail
#

Yes that's correct.

bronze wasp
#

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?

lofty trail
#

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

bronze wasp
#

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?

lofty trail
#

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.

bronze wasp
bronze wasp
#

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?

lofty trail
#

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

bronze wasp
lofty trail
#

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

bronze wasp
#

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

lofty trail
#

I've got to step away @bronze wasp, but @feral atlas is here if you have any follow up questions.