#taylan-refund-product
1 messages · Page 1 of 1 (latest)
evt_1KgCitGBhi4wdnXzPBJWFr7X
evt_3KgCihGBhi4wdnXz0dKXynLa
So my main problem is I want to track product purchases and if it is refunded I want to track that one as well
I am tracking product purchases with invoice.finalized
I am trying to track the refund with charge.refunded
Got it. How do you track purchases on the associated PI?
I trying to track based on the product_id
Right, but you're using Payment Intents which don't work with Product/Price objects right now. So what on this PI [0] denotes which product was purchased?
[0]: https://dashboard.stripe.com/payments/pi_3KgCihGBhi4wdnXz0DSViddQ
Is it in the metadata?
Hmm now I see
I am a developer
metadata contains another product id
Which is not bound to stripe product ids
And PI binds all the events as you mentioned
Thank you for help I will elevate this question to the right person
Yep, so in your charge.refunded event you'll need to lookup the PI separately
Can I pull events bound to PI
Yep, but there's no refunded event for a PI
As that's not a valid PI status. It's the underlying Charge that is refuned
Okey thanks
Anyway, looking at your charge.refunded event, the metadata is on the Charge object:
metadata: {
account_id: "8271",
product_id: "1"
},