#misterJ-filter

1 messages · Page 1 of 1 (latest)

ocean isle
#

hi there! Can you share in more detail what was done? Are you filtering via the Dashboard? If yes, what filters were you trying to apply?

bold forge
#

No, I am a developer.. I am using stripes API. I am using this api (https://stripe.com/docs/api/payment_intents/search). the query I created was something like this:

' status:'succeeded' or status: 'canceled' and amount>300'

but I got an error that says Queries cannot have a mix of AND and OR

ocean isle
#

gimme a while to test this out

bold forge
#

or something like this

' status:'succeeded' or status: 'canceled' or amount<300 and amount>100'

the same error comes out

#

oh yeah I am using the stripe version "stripe_version" => "2020-08-27"

ocean isle
bold forge
#

what does that mean? so their is no way to use AND and OR,?

ocean isle
#

yes, there's no way to use AND and OR together in the same query at the moment using the Search API

bold forge
#

then how would I filter a status: succedd or status:canceled, AND amount>1000 AND amount<9000 ?

#

if everything is or, it will just show everything

#

if everything is AND nothing will show up

ocean isle
#

you can consider splitting it up into two separate queries i think. status:succeeded and amount > 1000 and amount < 9000, then another query for status:canceled and amount > 1000 and amount < 9000.

bold forge
#

oh is that possible,, hmm,,, wait let me try

ocean isle
#

you would need to make separate requests

bold forge
#

hmm,, it seems It cannot be done,,, their is only one paramter for query..

ocean isle
#

make two separate requests

#

request 1 : status:succeeded and amount > 1000 and amount < 9000
request 2 : status:canceled and amount > 1000 and amount < 9000

bold forge
#

wait? then would that be time consuming? how would I get the pagination?

ocean isle
#

if you want to use the Search API, this is the only workaround i can think of right now. There's no reason why you can't use pagination. You would just have to paginate across two sets of data

#

request 1 -> receive response, paginate and do something
request 2 -> receive response, paginate and do something

bold forge
#

oh men,,, hehe thanks anyway.. I think stripe should do about this... that kind of workflow is really really bad..

ocean isle
#

what are you trying to do with the data? Alternatively, you can consider using Sigma instead

bold forge
#

we created a payment page for the dashboard of our client, where they can see all the payment intents,, and we like to put filters like status, amount, and date,, but it sems like it cannot be done, knowing that AND and OR cant be used in a stripe query..

#

it is duable but your suggestion is really not good thing in our workflow, because the company has thousands of payments,,,

ocean isle
#

when you say client - do you mean connected account?

bold forge
#

yup connected account

ocean isle
#

is the connected account an express/standard/custom connected account?

bold forge
#

how to check what type of account?

ocean isle
#

do you have the connected account id?

#

or your platform account id?

bold forge
#

yup is has an account id

ocean isle
#

okay, can you share it?

bold forge
#

is the account ID sharable?

ocean isle
#

yes

bold forge
#

acct_1Gdbu9FAdwf2nw37

ocean isle
#

acct_1Gdbu9FAdwf2nw37 - is this the connected account or the platform?

bold forge
#

I dont know what is it,, they just shared to me the stripe account... and I just went straight and get the stripe keys, and added it on our web backend..

ocean isle
#

maybe let me rephrase my question - is this the account which you're trying to filter the PaymentIntents from?

bold forge
#

The account is owned by our client

ocean isle
#

Since this is the account your client wants to filter PaymentIntents from, there's no need for you to create an application just to filter for payments from this account. Your client can just login to their Stripe Dashboard and filter for the payments.

bold forge
#

but our clients wants it to be on their website or admin dashboard,,, because its tiring switing from website to website

placid shuttle
#

Hi @bold forge I'm taking over this thread, give me a sec to catch up.

bold forge
#

they have been using stripe for a long time,, but they decided to be part of their system, that is why they like that we create a dashboard something like the payment page in stripe,, so that user can check it on their own dashboard,, without going to website to website,, specially the client has a lot of people working,, we dont like to give the stripe account to the workers..

placid shuttle
#

It's indeed a technical limitation in the query API where our user can't use AND and OR at the same time. Maybe you want to discuss with your client and see if they can simplify the requirement?

bold forge
#

on the side of the stripe, is their a possibility stripe can update their API queries so that we can mix AND and OR on queries., it would help me and most develoeprs will be happy having this feature..

placid shuttle
#

We welcome any feedback! Can you send your feedback about Search API to Stripe support https://support.stripe.com/contact so that they can escalate it to the relevant team?