Validate Tax Number
Use this request to validate Tax IDs in standalone mode.
To validate a Tax ID, use the following URL and a GET method:
https://{service_url}/api/v3/tax_numbers/{tax_id}/validate?country_code={country_code}&country_subdivision_code={country_subdivision_code}&business_name={business_name}&cache_expiry_timeout_days={cache_value}&on_error={error_behavior}'
where:
{service_url}
: is the URL of the service's environment.{tax_id}
: is the Tax ID that you want to validate.{country_code}
: The 2 letter ISO code used to identify the country.{country_subdivision_code}
: The code that is used to denote the country subdivision such as a State in the USA or a province in Canada. For exampleCA-QC
for Quebec.{business_name}
: The name of the owner of the Tax ID.{cache_value}
: Validation results can be cached. This setting controls how recent the cache is. For example, if it is set to 0, the service will validate the ID against the authority's database in real-time. If it is set to 30, the service will use results cached over the last 30 days.
The following example validates an ID from Quebec in Canada, setting the cache to 30 and the on_error
setting to proceed
:
'https://{service_uri}/api/v3/tax_numbers/ABCD12345/validate?country_code=CA&country_subdivision_code=CA-QC&business_name=Franc%27s%20Flowers&cache_expiry_timeout_days=30&on_error=proceed'
Details
Type | Value |
---|---|
Endpoint | api/v3/tax_numbers/{tax_id}/validate |
Method | GET |
API Reference | Validate Tax Number |
Path Parameters
The following field can be specified in the path:
Field | Details | Description |
---|---|---|
tax_number | Mandatory | The Tax ID or number that is to be checked. |
Query Parameters
The following fields can be specified in the URL of the request:
Field | Details | Description |
---|---|---|
country_code | Mandatory | The country where the Tax ID originates. |
country_subdivision_code | Mandatory for Canada. | This is only required for Canada, where it is used to specify the Province such as Quebec. |
business_name | Mandatory for Canada. | This is only required for Canada, where it is used to specify the name of the business who owns the Tax ID. |
cache_expiry_timeout_days | Optional | Validation results can be cached. This setting controls how recent the cached result that is returned is. For example, if it is set to 0, the service will validate the ID against the authority's database in real-time. If it is set to 30, the service will use results cached over the last 30 days. |
on_error | Optional | Controls how the service behaves when an external service returns an error. If you specify proceed , the Tax ID will be marked as invalid. If you specify syntax_check , the format of the ID is checked. If the Tax ID is valid, the following is returned: tax-number-syntax-considered-valid-but-not-verified |
Response Parameters
The following fields are returned by the request:
Field | Description |
---|---|
buyer_tax_number_normalized | Returns a the ID in a standardized format. |
buyer_tax_number_valid | Indicates whether the Tax ID is valid or not. |
buyer_tax_number_format_valid | Indicates whether the syntax is valid. |
buyer_tax_number_validation_info | Provides more detailed about the processing. |
name | The name of the owner of the Tax ID. This is not returned for all countries. |
address | The address of the owner of the Tax ID. This is only returned for some countries. This is not returned for all countries. |
buyer_tax_number_service_cache_timestamp | If a cached value is returned, this field shows the time that the initial request was sent to the external service. |
buyer_tax_number_service_cache_used | Indicates that the cache of Tax IDs was used to verify the number. |
Updated about 1 month ago