   end
 
   defp address_params(%Address{} = address) do
+    state =
+      case address.state do
+        nil -> nil
+        _ -> state_without_country(address)
+      end
+
     %{
       Name: address.name,
       AttentionName: address.name,

        AddressKeyFormat: %{
          AddressLine: address.address,
          PoliticalDivision2: address.city,
          PoliticalDivision1: state_without_country(address),
          PostcodePrimaryLow: address.zip,
          CountryCode: address.country
        }

      Address: %{
        AddressLine: Address.address_line_list(address),
        City: address.city,
        StateProvinceCode: state,
        PostalCode: String.replace(address.zip, ~r/\s+/, ""),
        CountryCode: address.country
      }
