#KRS - subscriptions
1 messages · Page 1 of 1 (latest)
hi
So you were expecting to see metadata in the invoice.created payload, but it was missing? Can you share the event ID (evt_xxx)?
evt_1LFLaqI5vSu94Gk80vKm2hWz is the invoice.created event id
This event is for the invoice in_1LFLaqI5vSu94Gk8Nquv2GTq, and this invoice doesn't have any metadata: https://dashboard.stripe.com/invoices/in_1LFLaqI5vSu94Gk8Nquv2GTq
the metadata will come from the associated subscription.
here is the event id of another test account which we use it for development evt_1LFb0GK5Jxl3vjtiWOhTPLty
you can see that the meta data is present in the invoice line item but the associated invoice will not have the metadata but the subscription has the metadata
Thanks! Give me a few minutes to look into this.
ok
is there any tracking for this issue or you will reply on this thread itself?
sorry, my bad, I totally missed your thread while stepping in for my colleague @dusk birch
I will see to it
ack.
I don't seem to follow the issue here
metadata is missing in evt_1LFLaqI5vSu94Gk80vKm2hWz (production account)
metadata is present in evt_1LFb0GK5Jxl3vjtiWOhTPLty (development account)
we are trying to understand why it is different? our code based on development account is not working in the production account.
well they're different invoices, the production one was created by a SubscriptionSchedule
you set metadata on the Schedule object, yes, but that does not inherit down to the Subscription or any Invoices that get created, that's expected
i can see the subscription sub_1LFLaqI5vSu94Gk8Ox9wWcr8 (production account) has the metadata, but it is not part of the invoice
overall metadata doesn't get inherited down
an invoice will never have metadata unless you explicitly called the Create Invoice or Update Invoice APIs to set it
so usually the better option is to rely on metadata on the Subscription and then look up the subscription when you're working with an invoice (from the invoice.subscription field)
ok. got it.