#gpadax

1 messages ยท Page 1 of 1 (latest)

burnt boneBOT
frigid plume
#

Hello

#

That metadata would only show up if you actually retrieve the Price object

olive flume
#

๐Ÿ˜ฆ

frigid plume
#

So mostly it depends on what you are trying to do/accomplish

olive flume
#

I have a group of prices/subscriptions that I need to act on in the webhook. I have grouped them by metadata tag

#

didnt want to have to do a if then else for 6 items

frigid plume
#

What Event type are you listening for?

#

To ingest your data

olive flume
#

invoice_paid and customer.subscription.updated

frigid plume
olive flume
#

ok thank you, I will have to look at this.

#

this is called a subscr4iption right

#

this is the price of that subscription right

#

and this is the metadata

#

the price has no metadata option, only the subscription and that has been set

#

isn't this what you are talking about

frigid plume
#

You are just showing me screenshots

#

So I have no idea

#

If you share a Subscription ID with metadata set and Events where you expect to see that metadata then I can look

#

But screenshots really don't help

olive flume
#

prod_NBqUDcvo1uGOKG

frigid plume
#

Okay I see metadata set on that Product. Not sure what your question/confusion is though?

olive flume
#

why doesn't this data come through the webhook responses

#

I am trying to test for this metadata

frigid plume
#

I already told you that above -- it will only be present on the Product object itself. So it would only come through on Webhooks that contain the full Product object, like product.created

olive flume
#

ah ok

#

sorry

frigid plume
#

If you want to use customer.subscription.updated then that contains the Subscription object so the metadata would need to be on the Subscription

olive flume
#

oh.. and the subscription is on a per customer basis

#

not the product

frigid plume
#

Similarly, invoice.paid is the Invoice object so the metadata would need to be on that object. Fortunately, the Invoice object has a special property which is subscription_details and that will actually contain the metadata from the Subscription object within the Invoice object.

#

Right so what you likely want to do here is build this into your integration each time you create a Subscription

#

You set the corresponding metadata each time you do that

olive flume
#

got it!

frigid plume
#

๐Ÿ‘

olive flume
#

you rock dude

#

thank you