#seb_generated-card-metadata
1 messages ยท Page 1 of 1 (latest)
๐ 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
Hi, I had opned a similar ticket up [here](#dev-help message) yesterday but it has since been closed
hello! fyi i am looking into this now
hmm it doesn't look like you are following that guide, since you're creating a PaymentIntent here. are you trying to collect payment and then save a Payment Method?
https://docs.stripe.com/terminal/features/saving-payment-details/save-after-payment
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
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.
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
Sounds good. So what your saying is there's no way to collect and save the card with a nickname in one api call?
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
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?
no, the generated payment method only exists once a PaymentIntent has moved to requires_capture or succeeded as outlined in this section:
https://docs.stripe.com/terminal/features/saving-payment-details/save-after-payment?terminal-sdk-platform=server-driven#access-generated-card
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
no, manual capture would just change the event you're listening to
in that case you would listen for payment_intent.requires_capture
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 torequires_captureI'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
ok, so i'm thinking through the easiest way for you to handle this
i think that moving to a flow where you finalize payments on the server might be the easiest for you
https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment#submit-payment
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?
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?
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.
Awesome. I really appreciate the suggestion. I'm going to implement this tommorow. Could we leave the ticket open until then?
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
Sounds good. Well in that case, thank you for your help
We're happy to shed what ๐ก we can ๐