#Jogui -address

1 messages · Page 1 of 1 (latest)

ripe compass
#

hi! let me check but I'm not sure if we do any direct validation at that level

hardy current
#

I have an idea

#

after adding this information:

    Tax tax = customer.getTax();
    String taxCountryISO = tax.getLocation().getCountry();
    String taxCountryState = tax.getLocation().getState();

I can detect with this for example, Stripe Tax Excluded countries, because the state is canary island or specific place

#

if the zipcode is incorrect, i supose the state of the tax will be null

#

and therefore, i can understand no correct zipcode has added.

#

My fear its if this logic, can give me false positives, for countries that for whatever reason, Stripe don't add a State

ripe compass
#

yes, I was going to suggest looking at the customer.tax field as it's meant to be the canonical/normalised status returned from the tax engine

#

still looking, this is unfortunately not an area of our product I'm very familiar with. My gut feeling is probably we do no validation and we expect you to validate/sanitise the input, or that you always use our frontends like Checkout and the validation is built in there, but let me see if I can find anything

hardy current
#

Thank you, my company tax team is getting very exquisite when asking for new features and controls

#

🤡

ripe compass
#

as far as I can tell we don't have a way to have the API itself synchronously reject invalid postal codes and I can't make an error happen in testing, so I think my feeling above is likely correct. I'm not really confident in that answer though since I remember seeing the API throw 'invalid postal code' errors but I think it's only for other address fields like when onboarding accounts via Connect, and not here for Customer addresses

hardy current
#

hmm okay, i will investigate other solutions then

#

thank you 🙂

#

i supose some js or java package should exist for such controls