Skip to navigation

Verify Addresses

View as Markdown

Sales tax depends on where an order is going, so a clean destination address gives you the most accurate rate. The POST /tax/verify-address endpoint checks an address against postal data, returns the standardized form with a ZIP+4, and tells you whether it could be matched. Use it at checkout or anywhere else your integration needs to check an address. Verifying early, while the customer can still correct a typo, means the address you later send to a cart or order is complete.

For the base URL, authentication, and full schema, see the Verify Address reference.

Address verification supports US addresses only.

Handling the Result

Decide what to do next based on the response. The normalized field is explained in The Verification Object.

  • 200 without a verification object, or with normalized: true: use the returned address for your cart or order.
  • 200 with normalized: false: you can proceed with the address you sent. Without a matched street, the calculation uses the ZIP code to determine the rate. State tax is not affected, but some ZIP codes span more than one local tax jurisdiction, so a complete, matchable address gives the most precise local rate. Send the full address whenever you can, and consider showing the customer their address for confirmation. This result is only possible when you send allowUnverified: true.
  • 400: the address could not be verified. With allowUnverified: true, this means the postal code does not support the claimed state, so ask the customer to correct it. Without the flag, the street may simply be unmatched; see Allowing Unverified Addresses.
  • 429: you have reached the rate limit. Back off and retry, and do not block checkout on a rate limit.

Strict Verification (Default)

Send the address as the customer entered it, including line2 for an apartment or suite number when there is one. If the address matches a deliverable street address, you get back the standardized version.

POST /tax/verify-address
Content-Type: application/json
{
"line1": "401 Chicago Avenue",
"city": "Minneapolis",
"state": "MN",
"zip": "55415"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"line1": "401 Chicago Ave",
"city": "Minneapolis",
"state": "MN",
"zip": "55415-1515",
"countryCode": "US"
}

The street name is standardized, zip now includes the ZIP+4, and countryCode is filled in.

If the street cannot be matched, the response is 400 with no matches were found for address. Malformed input, such as a ZIP that is not 5 digits or ZIP+4, or a state that is not 2 letters, returns 422.

Strict verification is the default. If you leave out allowUnverified or send false, the behavior and response shape do not change.

Allowing Unverified Addresses

A 400 from strict verification does not always mean tax cannot be calculated. Carts do not verify the address. When the street cannot be matched, the calculation uses the ZIP code, so an address with a mistyped street name or a new building can still be taxed. If your integration treats every 400 as a hard stop, it can block checkouts that would otherwise calculate tax.

Set allowUnverified: true to get a graded result instead. The endpoint still returns the standardized address when it can. When it cannot, but the postal code supports the claimed state, it returns 200 with your address echoed back and a verification object explaining what was established.

The flag is a fallback, not a substitute for a complete address. Always send the full street address the customer entered. A matched address gives the most precise result, and the flag only decides what happens when the match fails.

A full match returns the same standardized address as strict verification, plus the verification object. Here is the same address with the flag:

POST /tax/verify-address
Content-Type: application/json
{
"line1": "401 Chicago Avenue",
"city": "Minneapolis",
"state": "MN",
"zip": "55415",
"allowUnverified": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"line1": "401 Chicago Ave",
"city": "Minneapolis",
"state": "MN",
"zip": "55415-1515",
"countryCode": "US",
"verification": {
"normalized": true,
"geocode": "approximate"
}
}

normalized: true confirms the address was matched, so you can use the returned address as is.

A partial match echoes your input and explains why. In this example, the street exists, but postal data has no such house number on it. A building too new to be listed returns the same result.

POST /tax/verify-address
Content-Type: application/json
{
"line1": "999 Chicago Ave",
"city": "Minneapolis",
"state": "MN",
"zip": "55415",
"allowUnverified": true
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"line1": "999 Chicago Ave",
"city": "Minneapolis",
"state": "MN",
"zip": "55415",
"countryCode": "US",
"verification": {
"normalized": false,
"geocode": "approximate",
"reasonCode": "street_not_found",
"reason": "street address could not be verified; the postal code supports the claimed state"
}
}

The address comes back unchanged, without a ZIP+4. normalized: false marks the result as partial, and reasonCode tells you why.

When the postal code does not support the claimed state, such as a ZIP that does not exist or a real ZIP paired with a state it does not serve, the response is still 400, with or without the flag. A valid ZIP on its own is not enough.

The Verification Object

The verification object is returned only when you send allowUnverified: true.

FieldMeaning
normalizedtrue when the address was matched and standardized. false when your input is echoed back because the street could not be matched. A false result can still be taxed at the ZIP code level, but it does not establish an exact tax jurisdiction.
geocoderooftop when the location is known to the building, approximate when it is a street or area estimate. Omitted when no location is available. Coordinates are not returned.
reasonCodeWhy the result is partial. street_not_found: the street could not be matched, and the postal code supports the claimed state. postal_coverage: the street could not be matched, and the postal code serves more than one state, including the one you sent. Omitted on a full match.
reasonA readable version of reasonCode. Use reasonCode for logic.

geocode and reasonCode may gain new values over time. Use normalized to tell a full match from a partial one, and treat an unrecognized reasonCode the same as any other partial result.