Validate Tax Number
Use this request to validate Tax identification number in standalone mode.
This request validates a tax number and supports country-specific validation, business name verification, and configurable cache settings to control whether the service uses recent validation results or performs a real-time check against the tax authority's database.
To validate a tax number, use the following URL and the GET method:
GET 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 base URL of the service environment.{tax_id}is the tax number to validate.{country_code}is the two-letter ISO country code associated with the tax number.{country_subdivision_code}is the country subdivision code associated with the tax number.{business_name}is the name of the business or individual associated with the tax number.{cache_value}is the maximum age, in days, of cached validation results. Specify0to perform a real-time validation against the tax authority. Specify a higher value, such as30, to allow the service to use validation results cached within that period.
Details
| Endpoint | Method |
|---|---|
/api/v3/tax_numbers/{tax_number}/validate/ | GET |
Request parameters
| Field | Required | Description |
|---|---|---|
tax_number | Yes | Specify the tax number to validate. |
country_code | Yes | Specify the two-letter ISO country code associated with the tax number. |
country_subdivision_code | Yes, for Canada | Specify the country subdivision code associated with the tax number. This field is required for Canada. For example, use CA-QC for Quebec. |
business_name | Yes, for Canada | Specify the name of the business associated with the tax number. This field is required for Canada. |
cache_expiry_timeout_days | No | Specify the maximum age, in days, of cached validation results. Use 0 to perform a real-time validation against the tax authority. For example, a value of 30 allows the service to use validation results cached within the previous 30 days. |
on_error | No | Specify how the service handles errors returned by external validation services. Use proceed to mark the tax number as invalid. Use syntax_check to validate only the tax number format and return the value tax_number-syntax-considered-valid-but-not-verified in the buyer-tax_number-validation-info response field. |
Response parameters
The following parameters are returned in the response:
| Field | Description |
|---|---|
buyer_tax_number_normalized | Returns the tax number in a standardized format. |
buyer_tax_number_valid | Indicates whether the tax number was successfully validated. |
buyer_tax_number_format_valid | Indicates whether the tax number was successfully validated. |
buyer_tax_number_validation_info | Provides additional information about the validation result and processing outcome. |
name | Returns the name associated with the tax number, when available from the validation authority. This field is not returned for all countries. |
address | Returns the address associated with the tax number, when available from the validation authority. This field is not returned for all countries. |
buyer_tax_number_service_cache_timestamp | Returns the timestamp of the original validation request when a cached validation result is used. |
buyer_tax_number_service_cache_used | Indicates whether a cached validation result was used instead of performing a real-time validation. |