#bryan_saved-pm

1 messages ยท Page 1 of 1 (latest)

craggy daggerBOT
#

๐Ÿ‘‹ 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.

hasty minnow
#

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?

inland ploverBOT
hasty minnow
#

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

final pawn
#

You are looking to save payment method info for future use right?

#

In a web app using React?

hasty minnow
#

Yes exactly

final pawn
hasty minnow
#

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

final pawn
#

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.

hasty minnow
#

ok great thank you. I'll give this a try. Thanks!

final pawn
#

Happy to help ๐Ÿ™‚

hasty minnow
#

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?

final pawn
#

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

inland ploverBOT