#gpadax
1 messages ยท Page 1 of 1 (latest)
๐ฆ
So mostly it depends on what you are trying to do/accomplish
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
invoice_paid and customer.subscription.updated
Okay then you can set the metadata you want on the Subscription directly with https://stripe.com/docs/api/subscriptions/create#create_subscription-metadata and then that will also be reflected on the Invoice in subscription_details.metadata: https://stripe.com/docs/api/invoices/object#invoice_object-subscription_details-metadata
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
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
prod_NBqUDcvo1uGOKG
Okay I see metadata set on that Product. Not sure what your question/confusion is though?
why doesn't this data come through the webhook responses
I am trying to test for this metadata
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
If you want to use customer.subscription.updated then that contains the Subscription object so the metadata would need to be on the Subscription
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
got it!
๐