#alas-checkout-update
1 messages · Page 1 of 1 (latest)
the metadata would be on the SetupIntent, not on that specific event. I strongly encourage you to use the checkout.session.completed event instead and put the metadata on the Session. That event will have all the info you need
@finite narwhal thank you for the response. Where in the checkout.session.completed event will I get the updated card data?
will checkout.session.completed contain the metadata too?
You can set the metadata on the Session creation, top-level, not inside setup_intent_data. And that even will have the metadata. And it also will have the SetupIntent id in https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-setup_intent and then you can call the API to get that SetupIntent and the related PaymentMethod id
hmmm.. i probably got the payment method update process all wrong. Can you please point me to the documentation which describes how to update payment method by creating session?
this is probably it: https://stripe.com/docs/payments/checkout/subscriptions/update-payment-details
Yes that's right, you can use checkout with mode=setup to collect a payment method
but you must take the step of updating the subscription yourself with the new payment method: https://stripe.com/docs/payments/checkout/subscriptions/update-payment-details#set-default-payment-method
(or updating the customer default for invoices)