#wen_unexpected
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/1239697559069528144
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Can you share how out are initializing Stripe?
hello this is how we initialize Stripe Elements
<Elements options={{ clientSecret: '{{CLIENT_SECRET}}'} stripe={stripePromise}>
{CheckoutForm}
</Elements>
Client secret variable is generated from server
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.
Client secret is generated from calling this endpoint https://api.stripe.com/v1/payment_intents
with the following params for example
curl https://api.stripe.com/v1/payment_intents
-d amount=6000
-d currency=usd
-H "Stripe-Account: acct_1H5GxwGbF4GB4p16"
-d capture_method=automatic
-d mode="payment"
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?