#22maryjane_api

1 messages ¡ Page 1 of 1 (latest)

elfin kestrelBOT
#

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

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

wooden flower
#

hello! looking at this now

#

this should be pretty straightforward - the address element emits a change event which you can listen to on your frontend and use to initiate a request to your backend, and on your backend you can just call update a PaymentIntent

mint pasture
#

That sounds great. So we can also call to update the payment intent when a customer applies a discount code to their cart total as well?

#

If a customer has an existing payment method but then in the PaymentElement decides to use a new credit card we update the user's cart with the new payment method. Should we also call an update to the payment intent at the same time?

wooden flower
mint pasture
#

OK that makes sense. I haven't seen an issue, just thinking ahead.

wooden flower
#

sounds good! let me know if you have any more questions