#malamhari_
1 messages · Page 1 of 1 (latest)
If I create a checkout session and add metadata
How can I access this metadata from webhook event?
I want to access this metadata on payment_intent.created and payment_intent.succeeded event
We don't automatically copy metadata between two associated objects (Checkout Session and PaymentIntent are separate objects)
So one option would be to retrieve the Checkout Session associated with the PaymentIntent by using the list API
https://stripe.com/docs/api/checkout/sessions/list
the other option would be to set the metadata on the PaymentIntent when you create Checkout Session instead
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-metadata
I see, that explains a lot
I'll try it, thank you so much