#.abishek
1 messages · Page 1 of 1 (latest)
I want to do the same with refunds as well
Well the associated is done via the related Charge object which has a customer field
No way to look them up directly via the API
so. I have to load the charge object on both refunds and disputes and identify the customer_id and then find an association. is that the way to go?
I think you will likely want to paginate over the Charges list endpoint, passing customer parameter. From that list returned you can see if the Charge has disputes and/or refunds:
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If disputed: true then you can use the Disputes endpoint to list them: https://stripe.com/docs/api/disputes/list#list_disputes-charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
A bit convoluted I agree