#Louis Daubié
1 messages · Page 1 of 1 (latest)
SetupIntents don't transfer their metadata to the payment methods that they create. So for that part of the question, you will need to use the API to update the payment method and add that metadata after it has been created
Looking in to the data.card.generated_from.setup_attempt' part. Can you send me the ID of a payment method that you are seeing this with?
ok but someone of the chat told me few hours earler i can acces to the metada set on the setupintent with expand generated_from.setup_itent
so i have to add the metada after the front end create the payment method ?
Then i will have this metadata enable on the data.card.generated_from.setup_attemp ?
there au payment method id : pm_1MxrodJOEn8vXy6hYdgcZ4aU
but if i use the paymentMethod api for add the cardName into the metadata, the property generated_from.setup_attempt is useless ? It will be directly on the payement method metadata no ?
If you set it that way then yes it would be directly on the payment method object
I am still trying to figure out why that generated from field is not being populated here. That would be easier to use if we can figure out how
@granite bloom huge apologies for the delay here. Unfortunately it looks like my colleague was wrong, that generated_from property is not populated by setup intents as far as I can tell. Will make sure we clarify that in the doc
One thing I did find that you can do here is list setup intents by their payment method https://stripe.com/docs/api/setup_intents/list#list_setup_intents-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok so the only solution is to do it in 2 time ? create intent -> create payment -> update metadata ?
Yes, either that or look it up with the list call
But copying the data will probably be easier and more robust to work with
ok thanks you for your time