How to: Verify an Address

One of the most important steps in determining the correct sales tax due for your customers is to ensure that the address they have provided is as accurate as possible.

You can accomplish this by using our VerifyAddress API.

Address Verification Example

Step 1. Set an Address Event Trigger

To know when you need to call VerifyAddress you must setup an event trigger on the address entry form so that once your customer fills in all of the address fields, your service or script will be notified to take action and verify the customer has provided address information.

Step 2. Gather the VerifyAddress API Parameters

Parameter Description Required
apiLoginID This is your website's API ID Yes
apiKey This is your website's API KEY Yes
Address1 This is the numbered street address Yes
Address2 This is a second address line No
City This is the city name No
State This is the two character state abbreviation Yes
Zip5 This is the US zip code Yes
Zip4 This is the Plus4 zip code (Required, but can be empty) Yes

Suggestion: While it is easy to ignore the optional parameters when you are testing, we strongly encourage sending all parameters every time.

Step 3. The POST

Once you have these parameters assembled, your HTTP POST to https://api.taxcloud.com/1.0/TaxCloud/VerifyAddress is ready to go!

It should look like this:

{
    "apiLoginID":"0X0X0X0X",
    "apiKey":"0X0X0X0X-0X0X-0X0X-0X0X-0X0X0X0X0X0X",
    "Address1":"162 East Avenue",
    "Address2":"Third Floor",
    "City":"Wilton",
    "State":"CT",
    "Zip5":"06851",
    "Zip4":""
}

Step 4. The RESPONSE

TaxCloud processes the address supplied with a USPS CASS address database to get the most accurate address possible given the information provided.

Normally, the response that comes back from TaxCloud will look like this:

{
    "ErrNumber": "0",
    "ErrDescription": null,
    "Address1": "162 East Ave # 3",
    "Address2": null,
    "City": "Norwalk",
    "State": "CT",
    "Zip5": "06851",
    "Zip4": "5715"
}

A few things to note in the response:

  1. The Address2 information was incorporated into the Address1 information.
  2. The City name was corrected (as far as the USPS is concerned).
  3. The Zip4 or Plus4 was provided.

What about Errors?

One of our most Frequently Asked Questions (right after is TaxCloud really free?) is:

What if the VerifyAddress fails to find a better address?

ANSWER: Do nothing! If VerifyAddress canot find a better address, you should proceed with the customer provided address.

Explanation: We're not putting out fires or responding to other 911-type emergencies. We just want to make a commercially reasonable effort to get the most accurate address possible (because that will ensure the most accurate tax jurisdiction assignment).

Step 5. Save the Updated Address Information

The corrected address information can by silently "swapped" into the customer-entered address fields, or you could provide a very light-weight UI to ask the customer whether they agree with the suggested address corrections or if they prefer to proceed with their address as entered.

You are now ready to proceed to your first API Lookup!