#xyliase_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/1336634191022129193
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- xyliase_webhooks, 4 minutes ago, 13 messages
An example of how you set metadata please
(the we_xxx isnt really helpful)
An evt_xxx ID is helpful ๐
// Create Checkout Sessions from body params.
const sessionParams = {
line_items: [
{
price: product,
quantity: 1,
},
],
mode: mode,
invoice_creation: {
enabled: true,
},
metadata: {
user_id: `${user}`,
guild_id: `${guild_id}`,
referrer: `${referrer_id}`,
},
success_url: `${req.headers.origin}/profile/billing`,
cancel_url: `${req.headers.origin}/premium`,
customer_email: `${email}`,
allow_promotion_codes: true,
};
// Conditionally add subscription_data only for subscriptions
if (mode === 'subscription') {
sessionParams.subscription_data = {
trial_period_days: 14,
metadata: {
user_id: `${user}`,
guild_id: `${guild_id}`,
referrer: `${referrer_id}`,
}
};
}
From this i would expect a top level and subscription level metadata on invoice.paid which i do get
But i would also expect a top level metadata on payment invoice.paid
Apologies again
You need to set payment_intent[metadata] for payment mode sessions and I think that is passed to the Invoice
Perfect thankyou
I'd test that as I'm not sure if it's passed down to the Invoice and related events
This doc implies it does not
Actually, you need to use this param: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-invoice_creation-invoice_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.