#yogooooooo_code

1 messages · Page 1 of 1 (latest)

misty muralBOT
#

👋 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/1389730176413466675

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

whole zephyr
#

Hi there

misty muralBOT
royal geyser
#

The UI amount just won't update. to match the payment intent.
Which UI amount are you referring to? Could you share the screenshot?

undone inlet
#

Ok, I'll see if passing the amount through the Elements component will work. I am referring to the amount in the apple pay sheet.

royal geyser
#

Then yes, updating the amount in the Element options should reflect the new value

undone inlet
#

It seems as though it won't accept amount as a prop on options because it does not exist on type StripeElementsOptionsClientSecret.

And I am not specifically typing the options object as such, I am typing it as StripeElementsOptions.

Why wouldn't it update along with the payment intent?

#

By it I mean the amount on the apple pay sheet

royal geyser
#

Express Checkout Element uses deferred intent flow, i.e. doesn't use amount the Payment Intent client secret, and only reads the amount from the options. To update the Elements options, StripeElementsUpdateOptions should be used: https://github.com/stripe/stripe-js/blob/master/types/stripe-js/elements-group.d.ts#L846

StripeElementsOptionsClientSecret is for Elements is for creation, not update.

GitHub

Loading wrapper for Stripe.js. Contribute to stripe/stripe-js development by creating an account on GitHub.

undone inlet
#

Ok, thank you