#natesmith_webhooks

1 messages ยท Page 1 of 1 (latest)

stuck iceBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rancid cradle
#

hello! You set the metadata on the subscription_data, so it will only show on the corresponding subscription object.

If you want it to show on the Checkout Session, you must also set the metadata in https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-metadata. Give it a try and see if it works

cerulean sequoia
#

no dice with this event id: evt_1SG8ffBjUrRZ1WNLZzY7CmfH

#
async function testCheckout() {
    const metadata = {
        test: 'this is a test',
    };
    const sessionData: Stripe.Checkout.SessionCreateParams = {
        ui_mode: 'custom',
        customer: 'cus_TBTF68oO3or4nI',
        payment_method_types: ['card'],
        line_items: [
            {
                price: 'price_1SExEHBjUrRZ1WNL1aSwOKmS',
                quantity: 1,
            },
        ],
        metadata,
        mode: 'subscription',
        return_url: 'https://example.com',
        subscription_data: {
            metadata, // Metadata attached to the subscription
        },
    };
    console.log('๐Ÿš€ ~ testCheckout ~ sessionData:', sessionData);

    const session = await stripe.checkout.sessions.create(sessionData);
    console.log('๐Ÿš€ ~ testCheckout ~ session:', session);
}
rancid cradle
cerulean sequoia
#

you are right. Idk why that happened though. I mustve not properly change my clientSecretPromise.

#

evt_1SG8m0BjUrRZ1WNL0jiJjC1j

#

we are good now

#

how would I get this info to also propagate to invoice events?

rancid cradle
cerulean sequoia
#

You are right! (that was an ai joke)

#

it is there. thank you

rancid cradle
#

great! feel free to reach out again if you're running into issue ๐Ÿ˜„

cerulean sequoia
#

thanks man I really appreciate it. having someone to reach out to when these things can be hard to find in the many docs is a real game changer

stuck iceBOT
#

โ›”๏ธ Stripe developers have stepped away for a short while

Please leave your questions here, and weโ€™ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.