#spboyle
1 messages · Page 1 of 1 (latest)
Hi there 👋 double checking, but I don't think that's a possible restriction to add with the Express Checkout Element.
I think the best option available for that, is to check the shippingAddress.address.line1 field that you receive in the confirm Event:
https://stripe.com/docs/js/elements_object/express_checkout_element_confirm_event?type=card#express_checkout_element_on_confirm-handler-shippingAddress-address-line1
Then leverage paymentFailed to indicate that there was a problem with the shipping address:
https://stripe.com/docs/js/elements_object/express_checkout_element_confirm_event?type=card#express_checkout_element_on_confirm-handler-paymentFailed
OK, is there a way to maybe plug that back into the address element to check for P.O. Boxes or should I write my own little "P.O. Box"-checking function?
I believe you'll need your own for now, but I'll file feedback with out teams that this would be beneficial to offer as a prebuilt feature for this element so they can consider that as a possible improvement.
Thanks for the advice and for the quick replies!