#emir_checkout-subscription-metadata
1 messages Β· Page 1 of 1 (latest)
π 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/1228452802968289400
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi π
That isn't possible currently. Each Portal Session is unique to a single Customer record.
Hello,
Is it common to create multiple customers per user? or is this a weird approach?
It's non-standard, but I can understand if you have some nuanced details to how you create subscriptions and record revenue
We try to keep our APIs flexible enough that we can support the less typical flows
But those non-typical approaches usually cannot leverage all our convenience features like Customer Portal
The reason for this approach is so we can relate the stripe customer to the organization and user. There was no metadata in the CustomerSubscriptionCreated event when i created the checkout link and added metadata, only the CheckoutSessionCompleted event had the metadata that i created in the checkout link.
That is because the metadata was added to the Checkout Session object
I couldn't figure out how to get the organization info in the CustomerSubscriptionCreated event
If you wanted to add metadata to the Subscription you can do that using the subscription_data.metadata parameter: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata
That tells the Checkout Session that you want this metadata to be part of the Subscriptin it creates, not the Checkout Session
will that metadata show up in the subscription events?
Yes. Because the Subscription webhook events return the Subscription object as part of their payload
It will not show up for events for the Invoices and Payment Intents
It is important to understand where the data lives and what each type of event provides to know where you can access it
alright thanks, helps alot we didnt see that property.
No problem, it's why we're here π
great service, super fastπ
That's what we shoot for here.