#juzarantri_code

1 messages ยท Page 1 of 1 (latest)

floral templeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1248612267042275389

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

molten bloom
#

hi there!

#

which line is returning that error exactly?

bold harness
#

Hey @molten bloom thanks for reverting

actually this is the code that is giving error

return (
<form onSubmit={handleSubmit}>
<PaymentElement />
<button type="submit" disabled={!stripe || !elements}>
Pay
</button>
{/* Show error message to your customers */}
{errorMessage && <div>{errorMessage}</div>}
</form>
);

molten bloom
#

can you open the error just above ("unhandeled payment element loaderror") and share the screenshot?

bold harness
molten bloom
#

well that error is pretty clear

bold harness
#

Actually I am new to it so I am unaware of it

#

as it was working before I don't know whats wrong now

molten bloom
#

the error is telling you that there are no available payment method to display, so that's why the Element is failing to load.

#

are you using a PaymentIntent to load the Payment Element, or do you use the deferred flow?

bold harness
#

No I will create payment intent once the user submits the card details

molten bloom
#

got it. can you share the code setting the Element options (amount, currency, etc.)

bold harness
#

Oh why account id ? ๐Ÿค”

#

amount is 12 and currency is usd

molten bloom
#

the amount is set to 12?

bold harness
#

yes

molten bloom
#

if so, that's expected to not work. Stripe requires a minimum of $0.50, which is amount:50

bold harness
#

oh so 100 = 1$?

#

Oh it worked

#

So i need to do 12 * 100 right?

#

if it 12 $?

#

it worked currently

molten bloom
#

yes $12 is 10*100 = 1200

bold harness
#

10 or 12?

#

Though thanks for help @molten bloom

molten bloom
#

woops, 12*100, sorry for the typo

#

happy to help ๐Ÿ™‚