Sandbox
A sandbox key (ek_test_…) runs the same API, validation and storage as a live key, but nothing leaves einvo. Create one in
Administration → API keys with the Sandbox key switch on.
| Live key | Sandbox key | |
|---|---|---|
| PINT AE / UAE TDD validation | yes | yes, same rules |
| Peppol delivery | yes | never |
| FTA reporting | yes | never |
| Status of a valid document | VALIDATED → SENT → DELIVERED | NOT_EXCHANGED, "sandbox": true |
| Plan quota | counted | not counted |
Billing issue | numbers, sends, e-mails | validates a provisional UBL; the draft stays a draft |
| E-mail, WhatsApp, reminders, payment links | yes | refused (403 SANDBOX_NOT_ALLOWED) |
Responses to sandbox keys carry X-Einvo-Sandbox: true. Sandbox documents appear in the portal with an orange Sandbox badge and in
webhook payloads with "sandbox": true, so your test endpoint can tell them apart. Idempotency keys are separate from live ones.
Sandbox issuing in the billing API
curl -X POST https://api.einvo.ae/api/v1/billing/invoices/$DRAFT_ID/issue -H "Authorization: Bearer ek_test_..."
{
"sandbox": true,
"invoiceId": "3f7a...",
"invoiceStatus": "DRAFT",
"documentId": "a12b...",
"documentStatus": "NOT_EXCHANGED",
"provisionalNumber": "SANDBOX-MHZ1K2A9",
"findings": []
}
findings lists the validation failures (rule id and message). No invoice number is consumed, stock and receivables are untouched.
Good to know
- The sandbox works on your company's real master data: customers, products and drafts created with a sandbox key are real records (delete test drafts when done).
- The seller endpoint must still be one of your company's Peppol participants, as in production.
- Use sandbox keys in CI: each run can submit the same sample with a new idempotency key.