eFakturuj / API Docs
eFakturuj Guides

Testing & sandbox

Use the sandbox endpoint for development and end-to-end send tests:

https://api.sandbox.efakturuj.sk/api/v1

Production remains:

https://api.efakturuj.sk/api/v1

The API paths, request bodies, response bodies, and auth header are the same in both environments. API keys use the single efk_… format; create and use keys in the environment you are calling.

Sandbox send testing

The sandbox is isolated from production, but not from Peppol delivery: calls to POST /companies/{company_id}/invoices/{id}/send exercise the invoice lifecycle without billing, and the send is real. The sandbox is connected to the Peppol TEST network (SMK), so documents are genuinely transmitted over AS4 to whatever test access point the receiver is published on — including a test participant belonging to another provider, so interop testing with other providers' test environments is fully supported. What the sandbox can never reach is production — a real, live Peppol participant — because the TEST network uses a separate SML zone and separate PKI that production access points don't trust. To test the full send → receive flow between two sandbox companies (no external partner needed), see End-to-end delivery in sandbox.

curl -X POST https://api.sandbox.efakturuj.sk/api/v1/companies/$COMPANY_ID/invoices/$INVOICE_ID/send \
  -H 'X-Api-Key: efk_…'
# → { "invoice_id": "…", "status": "queued", "message": "Invoice queued for delivery" }

Use the sandbox for integration tests that need the full create → validate → send → webhook/poll flow. Use production only when you intend to deliver a real invoice.

Validate-only loop

POST /companies/{company_id}/invoices/{id}/validate runs the full XSD + Peppol BIS 3.0.20 + Slovak Schematron pipeline and returns every issue without delivering anything and without billing. It is your development loop:

# Create a draft, then validate it — no delivery, no charge.
curl -X POST https://api.sandbox.efakturuj.sk/api/v1/companies/$COMPANY_ID/invoices/$INVOICE_ID/validate \
  -H 'X-Api-Key: efk_…'
# → { "valid": true, "xml_validation": { "xsd_valid": true, "peppol_valid": true, "errors": [] } }
  • Iterate on your payload until valid: true with zero errors.
  • Provoke failures — an invalid VAT category, a mixed-rate invoice, a missing required field — and you get the same Schematron rule ids and 400s as production, so you can build your error UX for free.
  • Use fictional VAT IDs (e.g. the SK99999… range) for test buyers so they can't collide with real Slovak entities.
  • GET /companies/{company_id}/invoices/{id}/ubl returns the generated UBL to inspect.

What doesn't change

  • Peppol readiness checks (POST /tools/peppol-check) always hit the real SMP / SML — there is no mock SMP.
  • Email delivery goes to the real SMTP relay — use a test inbox.

See also