#doplex
1 messages · Page 1 of 1 (latest)
How are you adding metadata? What API call are you using to update the metadata?
Manually in dashboard. I have try to add it in product and prices and I try to retrieve this information in webhook "customer.subscription.created" (see screen for more details)
You are adding metadata after the Subscription is created, so any created events that you receive via webhooks are not going to have that metadata on them
Hm ok, I'm having trouble understanding, what is the metadata on the product page ? I saw that we could add metadata based on a context (session), but in my case they are filled out of context, so shouldn't I receive these metadata as default values ?
Ah, apologies. I think I misunderstood that page (I only speak english)
Just a minute
Yeah sorry I don't find where I can select current lang
It's all good. So, where are you looking for metadata right now? Which Event? And where in that event are you looking for metadata?
I want to retrieve it in customer.subscription.created or checkout.session.completed, but if I can get it in checkout it's better, I use the pricing table web component so I have per default a checkout session
I was thinking I could get it from LineItems in checkout object, but I get a empty array in it
Checkout sessions have a metadata attribute as well, if that helps. Otherwise, anytime you get an event that has that specific Product (e.g. a Subscription or a Checkout Session) you will need to make a separate API call to get its metadata, since this is not provided by default in the event payload
Ok I see, if it's the only way, we'll go on an api call
Thank for your help and your time, have a good day !