#guto1987_api
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/1222182076682469530
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ taking a look. I don't recall exactly how much flexibility you have regarding the error message being surfaced, but if you're validating shipping address information I think the shippingaddresschange Event may be a better fit to hook on the than the confirm Event.
It lets you call a reject function to indicate the address isn't acceptable.
https://docs.stripe.com/js/elements_object/express_checkout_element_shippingaddresschange_event#express_checkout_element_on_shipping_address_change-handler-reject
Hello! Thanks for your feedback! Yes, I can validate the address on the shippingaddresschange event, however, considering I don't have access to all the address data on this event, just the Zip Code, State and City, I can't validate it precisely. Anyway, the reject method doesn't allow me to display a specific error for PO Box address. ๐
Ah, whoops, good point about not having the line1 information there.
Hm, there may not be an option to pass something more specific. When you call paymentFailed, does that leave the modal open and that's where the failure message is surfaced?
Yes, it does:
Dang, was kinda hoping it'd close it and take you to a UI you have more control over. Let me see if my teammates know of a way to pass something more specific there.
Cool, thanks! Showing a custom message would be the best way here. We don't want to close the modal and show a message on our UI, since we can lose that purchase because of a simple UX issue
We're still not coming up with anything so far.
I'm thinking this is something that currently isn't possible. I'll likely need to file feedback with the appropriate team on our end indicating this is something you'd like them to consider adding support for in the future.