#dmitry_hawk
1 messages · Page 1 of 1 (latest)
Hello 👋
I am not fully clear on the ask but no, you can't access metadata you set on the checkout session object via payment_method.attached event
Hello Hanzo! ok, is there a way to pass some values and get access from payment_method.attached?
Are you using Checkout in setup mode or payment mode?
the payment mode
taking a step back, what's the usecase for needing the metadata on payment_method.attached event?
ok, I need to send an additional request to a specific url and I'd like to make it dynamic and not hardcoded. so I want to send this url and metadata and once the event fires I want to send the additional request to the url I sent in the metadata
or maybe I can get access to the checkout session metadata from payment_method.attached event?
Unfortunately not, Checkout Sessions can set metadata on themselves or the payment intent that they create, but not the paymentmethod. So you can set metadata and use it in the payment_intent.succeeded or checkout.session.completed events that trigger at the same time, but you can't do this on payment_method.attached
Happy to provide further info on how to set it on those other events though
Can you tell me more about why those other events don't work for you?