#taylan-refund-product

1 messages · Page 1 of 1 (latest)

sudden roost
#

Hey what's the Charge ID?

half berry
#

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

sudden roost
#

Got it. How do you track purchases on the associated PI?

half berry
#

I trying to track based on the product_id

sudden roost
#

Is it in the metadata?

half berry
#

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

sudden roost
#

Yep, so in your charge.refunded event you'll need to lookup the PI separately

half berry
#

Can I pull events bound to PI

sudden roost
#

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

half berry
#

Okey thanks

sudden roost
#

Anyway, looking at your charge.refunded event, the metadata is on the Charge object:

metadata: {
      account_id: "8271",
      product_id: "1"
    },