Breaking Change
The state property of Stripe's Address Element now defaults to Latin character formatting. Previously, the getValue() method and billing/shipping address change events would return the state value in a format matching the user's browser locale.
What Developers Need to Know
If your code expects localized state values, you must update it in one of two ways:
- For
getValue()calls: Pass theformat: 'localized'option to retrieve the state in the user's browser locale - For address change events: Call
getValue({format: 'localized'})within the event callback to get the localized value
The address change event itself always returns a Latin-formatted state, so explicit calls to getValue() are required if you need localization.
Migration Path
Review any code that:
- Relies on the Address Element's
stateproperty - Expects locale-specific state formatting
- Passes the state value to backend services or databases
Update these sections to either accept Latin-formatted states or explicitly opt into localization using the format: 'localized' parameter. This change aligns the Address Element with standardized character formatting for better consistency across international applications.