Test Mode
Test mode lets you build and test your Vatly integration without making real VIES/HMRC/BFS/Bronnysund calls or consuming your monthly quota. Use avtly_test_ API key instead of a vtly_live_ key.
How it works
- No upstream calls: Requests never reach VIES, HMRC, BFS, or Bronnysund
- No quota usage: Test requests don’t count toward your monthly limit
- No burst limit: Test keys are exempt from the per-minute burst limit
- No rate limit headers: Since there’s no quota or burst limit, rate limit headers are omitted
- Async endpoints reject test keys:
/v1/validate/asyncand/v1/validate/async/batchreturn403 forbiddenforvtly_test_keys. Use avtly_live_key for async testing - No caching: Every request returns a fresh response
- Format validation still applies: Invalid VAT formats return
invalid_vat_formatjust like in live mode meta.mode: "test": Every test response includes this field so you can distinguish test from live
Magic VAT numbers
Use these specific VAT numbers to trigger predictable scenarios:| VAT Number | Scenario | Status | Company |
|---|---|---|---|
DE111111111 | Valid EU company | 200 | Test GmbH, Berlin, Germany |
GB111111111 | Valid UK company | 200 | Test Ltd, London, United Kingdom |
FR11111111111 | Valid French company | 200 | Test SARL, Paris, France |
DE222222222 | Valid, no company details | 200 | valid: true, company null |
DE000000000 | Invalid VAT | 200 | valid: false, company null |
DE999999999 | Upstream error | 503 | upstream_unavailable |
DE888888888 | Service unavailable | 503 | upstream_unavailable |
DE777777777 | Rate limit exceeded | 429 | rate_limit_exceeded |
DE666666666 | Burst limit exceeded | 429 | burst_limit_exceeded |
DE555555555 | Stale cache fallback | 200 | Test GmbH (stale), source_status: "unavailable" |
CH111111118 | Valid Swiss company | 200 | Test AG, Zurich, Switzerland |
CH222222225 | Valid Swiss UID, not VAT-registered | 200 | valid: false, company present |
LI111111118 | Valid Liechtenstein company | 200 | Test Anstalt, Vaduz, Liechtenstein |
NO123456785 | Valid Norwegian company, MVA-registered | 200 | Test AS, Oslo, Norway |
NO987654325 | Valid Norwegian org, not MVA-registered | 200 | valid: false, company present |
CH999999996 | BFS upstream error | 503 | upstream_unavailable |
NO999999999 | Bronnysund upstream error | 503 | upstream_unavailable |
valid: true with a generic “Test Company” / “Test Address”.
Examples
Valid response
Error response
Behavior notes
- Consultation numbers are included for all tiers when a matching
requester_vat_numberis provided - Input normalization works the same as live mode.
"de 111.111.111"becomesDE111111111 - Non-magic numbers return a generic valid result, so any integration test with valid-format VAT numbers will succeed