![]() | ||
![]() | ||
| Related Topics | ||
"Your online store and account control is priceless as we can make changes instantly!" |
||
VAT Number Verifier
The VAT Number Verifier (VNV) is a cgi that call be called with a ISO country code and a VAT number to both verify the VAT number is correct and return the VAT rate as a percentage for the matching country code. It will also determine if state tax will be charged.
Syntax:
http://usd.swreg.org/cgi-bin/vnv.cgi?mode=<mode>&country=<ISO country code>&state=<state code>&number=<number>&city=<city>&zip=<zip>
The mode parameter affects the format of the output. This parameter can be one of the following values.
In plain mode, the module will return the percentage rate, or 0 with 2 lines of errors separated by return characters. This will be prefixed with a content type line.
Eg. vnv.cgi?mode=plain&country=GB&number=GB123456789
will return ([cr] indicate a carriage return character)..
Content-Type: text/html[CR][CR] 17.5%[cr]
If an error occurrs...
Eg. vnv.cgi?mode=plain&country=GB&number=GB1xxx789
will return ..
Content-Type: text/html[CR][CR] 0%[CR] 4[CR] Invalid VAT number
See the Errors section below for a list of all possible errors.
HTML mode is similar to plain mode, however a full basic html page is output with the result encluded between <PRE> tags.
Sparse mode is similar to plain mode, however only the full VAT rate or 0% will be output (for both an error condition or countries that do not have VAT).
Sparse HTML mode is similar to Sparse mode, however the output is placed in a full HTML page similar to the normal HTML mode.
If a European country is passed in with a valid VAT number, then the VAT rate will be output othwise it will be treated as an error condition and a rate of 0% will be output. In HTML/Plain mode 3 lines of data will be output
<rate>[CR]
<error_number>[CR]
<textual error message>[CR]
The following are a list of supported error messages. Any error code 10 or greater is a fatal error.