#suren-metadata
1 messages · Page 1 of 1 (latest)
look when I create a subscription and put some metadata on the webhook e I get metadata on both subscription.update and invoice.paid
my question now
it seems to me that there are events when I do not receive this metadata inside invoice.paid
that's very vague sorry
what are those events specifically? The exact evt_xxx event IDs that don't have metadata that you expect to see, for example.
i just need to know when metadata is automatically passed from subscription to invoice.paid
and when not
as far as I know, never.
metadata on the Subscription object is on the Subscription object, it does not get copied down to the Invoices that Subscription creates; if that's what you mean.
evt_1K9Wd6BfTh1Z0SMkrUNmxoIs
thanks. So what should I be looking at with this?
"evt_1K9UwsBfTh1Z0SMkPpJmiz2W", "evt_1K9UwtBfTh1Z0SMkBb5RMgM6",
copied metadata here
the fact is that all this is unpredictable
I just need to understand when this is being passed
are you referring to the metadata on the Invoice line item sli_10bdd1BfTh1Z0SMk044eee0a in the Event evt_1K9UwtBfTh1Z0SMkBb5RMgM6 ?
yes
then yes, that has the metadata from the Subscription, as documented here : https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-metadata
Note it's the line item that inherits the metadata, not the overall Invoice object itself.
that all seems normal. Do you have an example of something where you expected metadata but didn't see it, since you say it's unpredictable?
yes I just accidentally looked at the webhook history and there is invoice.paid where there is no metadata
and in order for everything to work properly, everything I decided to clarify this with you
to clarify, when you say that, you mean you looked at the top-level metadata on the Invoice and saw it's blank? That's expected, as I said, the Invoice does not inherit metadata from the Subscription. The line item in the invoice does though.