#EzequielCalcanat-refunded
1 messages · Page 1 of 1 (latest)
sorry, paymentIntents
Gotcha, thank you.
I'm thinking through that, but I don't think there is going to be a straight forward way to do this.
The only approach that is coming to mind, is to do a search for Charge objects where refunded is set to false:
https://stripe.com/docs/api/charges/object#charge_object-refunded
https://stripe.com/docs/api/charges/search
Keeping in mind that the field would still be false if the Charge has only been partially refunded.
Then when you find a Charge that hasn't been refunded you can find it's associated Payment Intent.
https://stripe.com/docs/api/charges/object#charge_object-payment_intent
I was reading the Search documentation and refunded is a field that have a similar structure as this, the difference is that refunded its on charges{data[{refunded}]}
So, maybe to search by that field would be charges.data[0].refunded:false
What is it that you're ultimately trying to achieve here?
I have a dropdown list and users can search within a period of time the payments that have been refunded or not, well, that's the idea
Ah gotcha, thank you for that clarification. (I was thinking if this was a one-off search that it might be easier to do from the dashboard).
I do think Search is going to be your best approach, but I'm honestly not sure whether it would be easier (or even possible) to search for this at the Payment Intent level rather than the Charge level.