#wen_unexpected

1 messages ยท Page 1 of 1 (latest)

next galeBOT
#

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

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

sage matrix
#

Hi ๐Ÿ‘‹

Can you share how out are initializing Stripe?

sonic dagger
#

hello this is how we initialize Stripe Elements
<Elements options={{ clientSecret: '{{CLIENT_SECRET}}'} stripe={stripePromise}>
{CheckoutForm}
</Elements>
Client secret variable is generated from server

sage matrix
#

What object is the client secret coming from?

#

What code on the server generates it?

#

If you are using a Setup Intent, then it doesn't make sense to specify an amount. If you are using a Payment Intent, you need to update the amount on the Payment Intent instead.

You only specify an amount on the elements if you are using an integration that does not initialize with a client_secret.

sonic dagger
#

Client secret is generated from calling this endpoint https://api.stripe.com/v1/payment_intents

#

as per your comment "If you are using a Payment Intent, you need to update the amount on the Payment Intent instead."? so we can't update using elements.update in the UI?

sage matrix
#

Correct

#

You need to update it on the server, then fectch updates on the element