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. Specify 0 to perform a real-time validation against the tax authority. Specify a higher value, such as 30, to allow the service to use validation results cached within that period.

Details

EndpointMethod
/api/v3/tax_numbers/{tax_number}/validate/GET

Request parameters

FieldRequiredDescription
tax_numberYesSpecify the tax number to validate.
country_codeYesSpecify the two-letter ISO country code associated with the tax number.
country_subdivision_codeYes, for CanadaSpecify the country subdivision code associated with the tax number. This field is required for Canada. For example, use CA-QC for Quebec.
business_nameYes, for CanadaSpecify the name of the business associated with the tax number. This field is required for Canada.
cache_expiry_timeout_daysNoSpecify 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_errorNoSpecify 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:

FieldDescription
buyer_tax_number_normalizedReturns the tax number in a standardized format.
buyer_tax_number_validIndicates whether the tax number was successfully validated.
buyer_tax_number_format_validIndicates whether the tax number was successfully validated.
buyer_tax_number_validation_infoProvides additional information about the validation result and processing outcome.
nameReturns the name associated with the tax number, when available from the validation authority. This field is not returned for all countries.
addressReturns 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_timestampReturns the timestamp of the original validation request when a cached validation result is used.
buyer_tax_number_service_cache_usedIndicates whether a cached validation result was used instead of performing a real-time validation.