#misterJ-filter
1 messages · Page 1 of 1 (latest)
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?
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
gimme a while to test this out
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"
it's expected behaviour - The wording could probably have been phrased better in our public docs. I think it's vaguely alluded to in AND and OR are mutually exclusive. in https://stripe.com/docs/search#search-query-language
what does that mean? so their is no way to use AND and OR,?
yes, there's no way to use AND and OR together in the same query at the moment using the Search API
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
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.
oh is that possible,, hmm,,, wait let me try
you would need to make separate requests
hmm,, it seems It cannot be done,,, their is only one paramter for query..
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
make two separate requests
request 1 : status:succeeded and amount > 1000 and amount < 9000
request 2 : status:canceled and amount > 1000 and amount < 9000
wait? then would that be time consuming? how would I get the pagination?
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
oh men,,, hehe thanks anyway.. I think stripe should do about this... that kind of workflow is really really bad..
what are you trying to do with the data? Alternatively, you can consider using Sigma instead
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,,,
when you say client - do you mean connected account?
yup connected account
is the connected account an express/standard/custom connected account?
how to check what type of account?
do you have the connected account id?
or your platform account id?
You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123
yup is has an account id
okay, can you share it?
is the account ID sharable?
yes
acct_1Gdbu9FAdwf2nw37
acct_1Gdbu9FAdwf2nw37 - is this the connected account or the platform?
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..
maybe let me rephrase my question - is this the account which you're trying to filter the PaymentIntents from?
The account is owned by our client
yup
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.
if you ask them to login to https://dashboard.stripe.com/test/payments, they would be able to see a bunch of possible filters
but our clients wants it to be on their website or admin dashboard,,, because its tiring switing from website to website
Hi @bold forge I'm taking over this thread, give me a sec to catch up.
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..
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?
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..
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?