#centro6016_best-practices
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/1308572492981342268
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
This is a totally supported flow, as long as you have a reason to use it.
What's your use case?
We're currently doing checkouts with the CardElement. We want to transition to the PaymentElement but saw the docs mostly push for creating the payment intent first. We have a flow for users to make "offers" for our product, but without knowing the amount, are worried about what happens when confirming if the original amount changes.
You will need to set the amount on the PaymentElement when you render it without client_secret too, so it's not going to help.
You can create a PaymentIntent first and then update it if the amount changes. Once it's fixed, you can confirm it.
Ok cool that's great to know we can just update and confirm. As for switching the component over it was just easier to switch without first creating the PaymentIntent, I just wanted to make sure doing so was still supported as we transition over. Thanks!