#KRS - subscriptions

1 messages · Page 1 of 1 (latest)

dusk birch
#

Hi there!

dawn flume
#

hi

dusk birch
#

So you were expecting to see metadata in the invoice.created payload, but it was missing? Can you share the event ID (evt_xxx)?

dawn flume
#

evt_1LFLaqI5vSu94Gk80vKm2hWz is the invoice.created event id

dusk birch
dawn flume
#

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

dusk birch
#

Thanks! Give me a few minutes to look into this.

dawn flume
#

ok

dawn flume
#

is there any tracking for this issue or you will reply on this thread itself?

safe narwhal
#

sorry, my bad, I totally missed your thread while stepping in for my colleague @dusk birch

#

I will see to it

dawn flume
#

ack.

safe narwhal
#

I don't seem to follow the issue here

dawn flume
#

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.

acoustic frost
#

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

dawn flume
#

i can see the subscription sub_1LFLaqI5vSu94Gk8Ox9wWcr8 (production account) has the metadata, but it is not part of the invoice

acoustic frost
#

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)

dawn flume
#

ok. got it.