#charlie-fanbase_best-practices

1 messages ยท Page 1 of 1 (latest)

silver bayBOT
#

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

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

soft hatch
silver bayBOT
limber spire
#

Ok, what if we don't create the address elements in our HTML, does Stripe automatically create them?

#

E.g. in this example I just rendered the payment element, would Stripe automatically insert further address fields if there were needed and handle the validation from them?

proud trench
#

Hi there ๐Ÿ‘‹ yes, the Payment Element will automatically collect any information that is required for a payment to be attempted, or has a large impact on the likelihood of the payment being approved, for the given payment method type selected. For instance if my memory serves correctly, ACH drops the postal code field but adds a full name field.

limber spire
#

OK great thanks

#

In the documentation the JS that is there is throwing an error, I wanted to ask if there is something wrong with it? (Or if I'm doing something stupid)

#

Stripe declares const loadActionsResult = await checkout.loadActions(); as part of the intialise method, but then references loadActionsResult in handleSubmit, which isn't in the same scope so it throws an error?

proud trench
#

Hm, what is the error that is being thrown? I didn't see it impacting the Payment Element on that page, but maybe I overlooked something.

limber spire
#

It breaks when running on submit, we can handle it ourselves, just thought it was strange that the docs were throwing an issue

proud trench
#

Ah gotcha. Alright, I'll make a note to take a closer look at that when I'm done covering the server, and see if we need to tweak our sample code a bit. Thanks for flagging that!