#typedef_subscription-metadata

1 messages ¡ Page 1 of 1 (latest)

trim cosmosBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270407247339454495

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

hasty cradle
#

@merry trellis Hello! Do you have a lot more specific details than this? Add metadata to what? Which Event? Which object?
Like you can totally call the Subscription Update API and pass new metadata and have it reflected on future Events

#

typedef_subscription-metadata

merry trellis
#

beacuse if you add metadata to the sub manually it wont show up because you can only add the subscription metadata on sub creation

hasty cradle
#

I mean if the Invoice is already created, finalized and paid, then it's impossible to have it reflect new metadata from the Subscription. So I would say no?
Sorry it's still really cryptic to me what you could be asking

merry trellis
#

Like when im creating a checkout session for subscription

#

I can add userId in the metadata

#

but for the old subscriptions that doesnt have it, i cant just add it manually to the subscription because it has to be added on creation

#

If I add to this subscription's metadata manually, it wont show up in webhook

hasty cradle
#

You have a Subscription A. It has no metadata. It creates an Invoice, that Invoice will have no metadata inside subscription_details. Later, you update that Subscription and add metadata to it. The next Invoice will have the metadata as expected.
It is impossible, after the fact, to go back and modify an older Invoice to reflect new metadata that way. The subscription_details property is here to snapshot what the Subscription looked like when the Invoice was finalized. You can't write to it.

merry trellis
#

ahh so if i add manually it will show up in the next invoice?

hasty cradle
#

yes

merry trellis
#

Got it, I tried to add then resend event ddnt show up so I should wait till next invoice thanks!

hasty cradle
#

yeah Events represent a snapshot of something, they are "immutable" once they are created