#zerosodium
1 messages · Page 1 of 1 (latest)
Hello! Checkout Sessions don't copy over their metadata to the generated objects - what we offer instead is the subscription_data.metadata param (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-metadata) which allows you to set the metadata that will be on the Subscripton generated after the checkout session is completed
Unfortunately, that will only get you part way though since it'll set the metadata on the subscription, and not the Invoice/PI.
so there's no way to attach any information from the embeded checkout that will pipe to the payment intent succeded event?
No, currently it's not possible if you're in subscription mode. Your best option would be to retrieve the assocaited Subscription when you get the payment_intent.succeeded event
ah ok, so once I set that, I'll recieve the webhook with the subcriptionid, and lookup the metadata that way, correcto?
Almost! To be more accurate, your webhook would include the full PaymentIntent which includes an invoice attribute. You can retrieve that Invoice and expand subscription to get both the Invoice and Subscription (with the metadata you need) in a single request