#nicolas-z_webhooks
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/1360213937664036975
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
You're probably using the wrong parameter. Can you share an example request ID where you create a Checkout Session?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes you need to use subscription_data[metadata]: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
As explained here: https://docs.stripe.com/metadata#set-indirectly
the same code on live mode works well, check this: evt_1RCe3FFCfMrF7Me15Yia725f
is there any difference between live mode and test mode?
Shouldn't be, no
You passed subscription_data[metadata] there: https://dashboard.stripe.com/logs/req_8TwLoTin4AtsEm
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So not exactly the same code
Got it, let me check that,
What is the difference between the metadata in SessionCreateParams and metadata in SessionCreateParams.SubscriptionData? which one would be passed through to the later events?
The link here explains. Top-level metadata parameter is only set on the Checkout Session object and checkout.session.* events
If you use subscription_data[metadata] then that is passed to the Subscription object and customer.subscription.* events, and the Invoices use that as a 'snapshot' at time of generation
Got it, thanks you so much!!
No problem, glad I could help!