#seb_generated-card-metadata

1 messages ยท Page 1 of 1 (latest)

acoustic fernBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1436055850593816626

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • seb_api, 10 hours ago, 6 messages
long valve
#

Hi, I had opned a similar ticket up [here](#dev-help message) yesterday but it has since been closed

neon island
#

hello! fyi i am looking into this now

#

if so you would probably just want to follow the guide above, and then at the end of the process when you have the generated_card you can update the payment method directly and add the metadata

long valve
#

thanks for looking into it. So I followed the guide and got it to work without a nickname and it worked. Adding this header to the stripe request was already in our codebase but I agree stripe's documentation doesn't seem to allow it

#

if so you would probably just want to follow the guide above, and then at the end of the process when you have the generated_card you can update the payment method directly and add the metadata
I tried doing this and as far as I understand, the payment needs to be complete before updating the card. When I tried, the payment wasn't complete and after doing some reading online it seems like the capturing of a payment has eventual consitency meaning I'm unable to initiate the payment and update that payment method in the same call to my API.

neon island
#

yes, you would need to wait for the payment method to be saved, which means waiting for the PaymentIntent to succeed

#

you could listen for the payment_intent.succeeded webhook event and initiate the payment method update after

long valve
#

Sounds good. So what your saying is there's no way to collect and save the card with a nickname in one api call?

neon island
#

not for this specific flow, no. we don't actually allow you to keep and reuse the exact same Payment Method used to pay for the Payment Intent, we create a separate generated Payment Method only after the intent succeeds

long valve
#

we don't actually allow you to keep and reuse the exact same Payment Method used to pay for the Payment Intent, we create a separate generated Payment Method only after the intent succeeds
Sorry why does the addition of a nickname change this guide so much? Isn't the guide saving the generated payment method before the intent succeeds?

neon island
long valve
#

Got it. So if intiate the payment intent request with manual capture, and then update the nickname for that payment before I capture it, would that work? That would eliminate the need for a webhook

neon island
#

no, manual capture would just change the event you're listening to

#

in that case you would listen for payment_intent.requires_capture

long valve
#

no, the generated payment method only exists once a PaymentIntent has moved to requires_capture or succeeded as outlined in this section:
Ok so based on the save payment details after payment guide, once a the payment intent has been moved to requires_capture I'm going to be able to update the saved method right?

With that can I not make a call to update payment method right after I initiate the payment intent?

#

If my tone comes off as argumentative, I just want to clarify thatโ€™s not my intention, Iโ€™m just genuinely confused about why adding a nickname is causing so many unexpected side effects

neon island
#

ok, so i'm thinking through the easiest way for you to handle this

#

this flow would allow you to synchronously confirm the PaymentIntent, which would then allow you to access the generated card and then perform any updates you need there

#

does that make sense?

acoustic fernBOT
long valve
#

Ya that makes total sense. So would I'd want to create the payment intent, initialize the reader, confirm the payment, and then update the nickname?

nova zinc
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague had to go. Yes, when you confirm the Payment Intent server side it will include the ID of the generated_card payment method, as my colleague pointed out. You would use that ID to update the Payment Method using the API: https://docs.stripe.com/api/payment_methods/update and specify the metadata you want to add.

long valve
#

Awesome. I really appreciate the suggestion. I'm going to implement this tommorow. Could we leave the ticket open until then?

nova zinc
#

We close these threads due to inactivity after ~30-45 minutes. But you will have access to this thread for reference and, if you come back tomorrow and start a new thread, the first message our helpful bot posts will include a link to this thread so you can reference it in your new discussion

#

If you look at the second message in this thread, you can see we link to a question you had 10 hours ago

long valve
#

Sounds good. Well in that case, thank you for your help

nova zinc
#

We're happy to shed what ๐Ÿ’ก we can ๐Ÿ™‚