Thursday, July 10, 2008

(Washington) WA Sales Tax Rate Lookup URL Interface - XML - ServerHTTPRequest

Since I have several customers with online stores in Washington State, I need to update their shopping cart checkout procedure to reflect a new rate collection rule that went into effect on July 1, 2008. The rule stipulates that Washington businesses must now collect and report sales taxes based on the delivery address of the buyer. This replaces the old method of calculating sales tax based on the location of the seller.

There are over 400 taxing jurisdictions each with their own code and rate. There is no practical way of figuring out which district a customer is in because any given city or county may have several different rates depending on the exact location of the buyer. People, like me, that perform work at customer sites have had to use a lookup tool on the state web site to find out which code to use for each customer because we've always been required to report based on where the work is performed. This, of course won't work on-the-fly for a web store checkout. Our Department of Revenue has now made available a method of querying their database thru the use of web code and getting the response back with the proper tax code. One method of getting the response is with XML. This was a new twist for me as I've had very little to do with XML or querying outside servers and capturing the results into variables that I can use. After a few hours of testing and research, I came up with a working module. It took another hour or two to trap some possible data entry errors - I don't mind if the response is an error code but I don't want the program to crash all together. I'm still testing for any other entry problems that I might have missed.

washington state sales tax rate lookup

Please try out my test module at http://www.johnrdykstra.com/wsst/wsst_test.asp and let me know if you find any bugs or if you need the code for a project.


1. alan church said...

I am taking a Web class using "IBM WebShere", anyway if still possible I would like the code, thanks. alan church eagel harbor, MI 49950

2. Bill Summers said...

You were ahead of the curve now that all of these states are going to destination based sales tax. Your function worked as advertised and I couldnt see or find any errors with the data returned. Could I talk you into sending a copy of the function for a site Im currently working on - the heritage network. Using paypal for the shopping cart and need to start doing this destination based tax for the books they are selling. Would very much appreciate your help . Thanks Bill

3. grady knight said...

I am real interested in your asp code used for the washington state sales tax look up. I am trying to do a site for a nonprofit group at www.theheritagenetwork.org. I would really appreciate any help you might be able to give me. Thanks, Grady

-- Add Your Comment --

Email address is not published
Remember Me

Write the characters in the image above

Things to Do
John's business web site
Google RSS and Gadget

Visit or Join Blog Catalog
Things to Buy

Nice tool to speed up your PC

Look for Pocket Controller Pro
Things to Read
Mezzanine View
Politics - Environment - Technology
Bridging the Gap...
to better writing
Autorotate's Flying Circus
Politics with humor - enjoy
Things to Buy

Best for Windows on Mac

Great backup software - low price
'Who sent you' top 10
Shameless Plugs
VBS Reachout Adventures
Vacation Bible School Program
Keep'n' Safe
Good deals on gun safes
Screw Outfitters
Complete line of Faspac fasteners
Tom Haseltine Photography
Note cards and more
East Point Seafood
Order canned seafood from cannery