Test environment
Bilteo separates production and testing into different tenants; it does not use a flag on the same tenant. Your test tenant (sandbox) has its own series, customers and invoices, isolated from the live tenant, and its API keys use the bk_test_ prefix.
With OAuth2, the user can authorize a connection to the test tenant in the tenant picker (or with its tenant_id). The access token is bound to that tenant and uses the same scopes as an API key. Authorize a separate connection to access the live tenant. See Authentication and scopes.
Production and testing
Production (bk_live_…) | Testing (bk_test_…) | |
|---|---|---|
| Data | Your live tenant | Isolated sandbox tenant |
| Numbering | Real legal series | Separate series (does not consume real numbers) |
| AEAT | Production | Certification environment (never production) |
| Documents | Valid invoice | TEST watermark, no fiscal validity |
An invoice issued in testing is never a real fiscal document: it includes a “TEST” watermark and test-document notice, and its Veri*Factu record is never sent to the AEAT production environment.
Veri*Factu behavior in testing
By default, issuing an invoice in a test tenant works just like production, but uses the AEAT test services: Bilteo generates the record and sends it to the certification environment. This lets you test the complete asynchronous cycle (pending → in-process → accepted | rejected), including the correction flow for a rejected record.
If you only need to exercise your integration without depending on the AEAT, configure your test tenant (from the Bilteo dashboard) with the verifactu.test_behavior setting:
| Value | When issuing in testing |
|---|---|
aeat_test (default) | Generates the Veri*Factu record and sends it to the AEAT certification environment. |
skip | Does not generate or send a record. The invoice is issued (numbered and moved to issued) but has no associated Veri*Factu record. |
Testing only
verifactu.test_behavior has no effect in production. A live tenant always generates and sends its Veri*Factu record to the AEAT; it cannot be disabled.
skip and cancellation
In skip mode the invoice has no record, so it cannot be cancelled through Veri*Factu (cancellation requires a record accepted by the AEAT). This is a shortcut for testing your issuance flow, not the complete lifecycle. Use aeat_test to test acceptances, rejections and cancellations.