Test Mode
Test mode lets you build and test your Vatly integration without making real VIES/HMRC 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 or HMRC
- No quota usage — Test requests don’t count toward your monthly limit
- No rate limit headers — Since there’s no quota, rate limit headers are omitted
- 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, Musterstrasse 1, Berlin |
GB111111111 | Valid UK company | 200 | Test Ltd, 1 Test Street, London |
FR11111111111 | Valid French company | 200 | Test SARL, 1 Rue de Test, Paris |
DE222222222 | Valid, no address | 200 | Test GmbH, address null |
DE000000000 | Invalid VAT | 200 | valid: false, no company |
DE999999999 | Upstream error | 503 | upstream_error |
DE888888888 | Service unavailable | 503 | upstream_unavailable |
DE777777777 | Rate limit exceeded | 429 | rate_limit_exceeded |
valid: true with a generic “Test Company” / “Test Address”.
Examples
Valid response
Error response
Behavior notes
- Consultation numbers are included for Business and Scale tiers, stripped for Free tier (same as live mode)
- 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