What is it?
Sandbox environment in Lookup allows you to test your integration with the TIN Validation API without triggering real tax authority lookups. It simulates a wide range of outcomes, including successful validations, input issues, service errors, and delays — all through the same API endpoints used in production.
This ensures your implementation handles all realistic scenarios before you go live.
Key benefits
- Safe environment for QA and testing.
- Supports both common and edge-case responses.
- Same API structure and format as in production.
- Allows simulation of country-specific logic and error conditions.
- Features like webhooks or fuzzy matching work as in production
Supported test inputs for TIN validation
To simulate different validation outcomes, use the following TIN values. The behavior may vary depending on the country selected, even for the same TIN.
TIN | Simulated Behavior |
---|---|
| Valid format, not found online |
| Valid format, found online |
| The same result as |
| The same result as |
| Special case for country-specific scenarios:
|
| Valid format, returns |
| Valid format, returns |
| Valid format, returns |
| Valid format, returns |
| Valid format, returns |
| Valid format, returns |
| Mexico only – returns |
| Mexico only – returns |
| Mexico only – returns |
| USA only – returns |
| USA only - an individual tin to demonstrate how SSN's are masked |
| Returns |
| Returns |
| Returns |
| Returns |
| HTTP 500 Internal Server Error with JSON body |
| HTTP 400 Bad Request with JSON body |
Any other value | Treated as invalid TIN format (validation not scheduled) |
Validation source handling
If the validation_database_source
parameter is used (e.g., vies
), the system applies the same source-selection and fallback logic as in production. This includes:
- Preferring VIES results where available.
- Falling back to local sources or returning appropriate errors based on input and country logic.
Example request
You can test Sandbox behavior using the TIN values described above across all supported validation endpoints:
- Works with both API v1 and v2
- Supports both single and batch validation endpoints
Below is an example using the v2 single validation endpoint with a test TIN (2000
):
curl --location 'https://sandbox.fonoa.com/lookup/v2/single-validations' \
--header 'Content-Type: application/json' \
--header 'Ocp-Apim-Subscription-Key: <your-sandbox-API-key>' \
--data '{
"country_iso_code": "pl",
"tax_identification_number": "2000"
}'