#anrighi.WR
1 messages · Page 1 of 1 (latest)
Could you provide a request id, and what do you expect vs. what do you see instead?
i have none of this - i am using this method https://stripe.com/docs/api/invoices/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but i would like to have parameters like:
amount > 0
product_id = [xx, yy, zz]
I think you can only filter amount by Listing PaymentIntent, but then you will have to find all corresponding Invoices
by finding the Invoice Ids on each PaymentIntent here https://stripe.com/docs/api/payment_intents/object#payment_intent_object-invoice
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so i should:
- list all the payment intents which correspond to my product with amount > 0
- extract for each pi object the invoice item
- retrieve all the invoices items
Hi! I'm taking over this thread.
Yes that should work. Note that "extract for each pi object the invoice item" can be done directly using expand. You can learn more about expand here: https://stripe.com/docs/expand
but using the https://stripe.com/docs/api/payment_intents/list method have no product or amount parameter
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
should i use a different method?
it seems to accept only the customer one
You are correct, I don't see an amount filter on the PaymentIntent... having a look.
Yeah it looks like you'll have to do the filtering on your end unfortunately.
i am trying to filter some invoices basing on the product they are based and their amount
List all invoices, and then on your end filter the invoice https://stripe.com/docs/api/invoices/list
this does not solve my problem - because my frontend goes into a timeout error
in order to use the search method, must i upgrade my api version? https://stripe.com/docs/api/invoices/search
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i am currently on a PHP environment, using "stripe/stripe-php": "^7.5",
Oh actually you are correct, you could use the search API for this!
The search API was added in stripe-php v7.120.0 https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#71200---2022-03-29
In the changelog I just shared above.
ok it seems to not be present, thanks for the help
"it seems to not be present" what do you mean by this?