Orders API: Use get_unprefixed_state
for state output to strip country prefix
#4598
Labels
dx
Efforts to enhance developer experience for creators
enhancement
Enhancement of existing features and services
Stripe Tax uses
ISO 3166-2
with subdivisions to perform a lookup on tax rates, e.gcountry-state
, which makes sense. On checkout we therefore store the state in this format too for tax calculations.However, customers expect a separation. Getting country from
orders.billing_address.country
and state fromorders.billing_address.state
(clean from country codes).So our output of the schema should use
get_unprefixed_state
to strip the country code from the state output in our API.The text was updated successfully, but these errors were encountered: