#dmitry_hawk

1 messages · Page 1 of 1 (latest)

tiny obsidianBOT
trim schooner
#

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

pure quarry
#

Hello Hanzo! ok, is there a way to pass some values and get access from payment_method.attached?

trim schooner
#

Are you using Checkout in setup mode or payment mode?

pure quarry
#

the payment mode

trim schooner
#

taking a step back, what's the usecase for needing the metadata on payment_method.attached event?

pure quarry
#

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?

tiny obsidianBOT
vague needle
#

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

pure quarry
#

no thank you, I'll try to find another solution

#

have a nice day guys!

vague needle
#

Can you tell me more about why those other events don't work for you?