#xyliase_webhooks

1 messages ยท Page 1 of 1 (latest)

prisma oreBOT
#

๐Ÿ‘‹ 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.

main marsh
#

Sorry sorry it's me again

#

i apologise

tacit shale
#

An example of how you set metadata please

#

(the we_xxx isnt really helpful)

#

An evt_xxx ID is helpful ๐Ÿ™‚

main marsh
#

        // 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

tacit shale
#

You need to set payment_intent[metadata] for payment mode sessions and I think that is passed to the Invoice

main marsh
#

Perfect thankyou

tacit shale
#

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

Learn how to use metadata to save additional information.