#bryan_saved-pm
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/1215736629319434342
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I want it to look somewhat similar to this checkout session page, but I'm not sure what the best practices are around adding the country and zip code components manually. Would adding the address component be a common practice?
Right now I am leaning towards adding the country dropdown and conditionally showing the zip code and doing validation based on if they are in US, UK, or Canada, but I feel like there should be a better way
You are looking to save payment method info for future use right?
In a web app using React?
Yes exactly
Have you taken a look at our doc specifically for this? https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements
I think I did, let me reread some of that
So I'd create the setup element from the backend, and then add card details via the paymentElement from the front end?
I thought i read somewhere that that wasn't recommended, but now that I'm reading this it seems right
This is still our canonical flow for saving payment methods.
There is another approach that lets you create the Payment Method first but it introduces more complexity and if you don't need that functionality then I don't think it's worth it.
ok great thank you. I'll give this a try. Thanks!
Happy to help ๐
Does this work if I simply want to add their payment method on file, but I don't want to do anything in regards to scheduling a payment?
That is exactly what it's for. The "Charge Later" section is just to provide an example of how you could use the saved payment method