W System / E-invoicing API for EU mandates, built for SaaS builders and AI apps
E-invoicing API for EU mandates, built for SaaS builders and AI apps
E-invoicing API for developers
Validate, create and test-send EU e-invoices from one API. Free sandbox key, no card needed.
- EN 16931 and XRechnung rules for UBL, CII and ZUGFeRD/Factur-X (including EXTENDED), with official rule IDs and fix hints
- Every send is checked first: VAT, Peppol reachability, sanctions. How safe send works
- Sandbox send with an Ed25519-signed receipt. Deadlines: Belgium since 1 Jan 2026, Poland KSeF for all from 1 Jan 2027, Germany issuing from 1 Jan 2027
No card needed · 500 free units a month
Try it now, no key needed:
curl -s https://api.wsystem.dev/einvoice/sample | curl -s -X POST https://api.wsystem.dev/einvoice/send -H 'Content-Type: application/json' -d "{\"mode\":\"sandbox\",\"invoice\":$(cat)}"Live Peppol sending is switched on per company after a Peppol mandate and our KYC check; sandbox sends never reach a real buyer.
Short answer: If your app creates invoices for EU businesses, the law is changing under you: Belgium requires Peppol B2B e-invoices since 1 January 2026, Poland's KSeF is mandatory since February/April 2026, every French business must receive e-invoices since 1 September 2026, and German businesses must issue them from 2027. W System gives you one call, POST https://api.wsystem.dev/einvoice/send, that verifies the buyer's VAT number (VIES) and screens sanctions lists, builds an EN 16931 UBL invoice from simple JSON, validates it against the official rules, looks up how the buyer can receive it (Peppol Directory, country mandate, French directory) and returns an Ed25519-signed evidence receipt. In sandbox mode every step is real except transmission, which is simulated and clearly labelled. With mode=live the invoice goes over production Peppol through our certified access point partner, for each company that has accepted the Peppol mandate and passed our KYC check (see Going live). Start with a free sandbox key, see Peppol pricing, or email [email protected] with your countries and monthly volume. No code needed to try it: the free browser validator and sandbox validates your own XRechnung, ZUGFeRD or UBL file and runs a sandbox send in one click.
Key facts
- What is live today:
/einvoice/validate(EN 16931 + XRechnung rules; UBL, CII, ZUGFeRD/Factur-X PDF),/einvoice/create(JSON to UBL: en16931, xrechnung, peppol-bis3 structure; CII: cii, xrechnung-cii; ZUGFeRD/Factur-X PDF: zugferd, factur-x),/einvoice/route(VIES + Peppol Directory/SMP + mandate),/kyb/check,/ddreport, and/einvoice/sendin sandbox mode (default mock transport transmits nothing; therecommandande-invoice-betransports submit to partner Peppol sandboxes, never to the buyer: see Sandbox transports).mode=livesends over production Peppol for companies with an approved mandate, with/einvoice/live/{document_id}(delivery state) and/einvoice/inbox(documents received on Peppol). MCP tools at https://api.wsystem.dev/mcp/. - What is not live yet: KSeF production submission (a KSeF TEST-environment connector is available, see /ksef-poland), delivery to a French accredited platform (PA), webhooks for document status (poll
/einvoice/live/{document_id}and/einvoice/inboxinstead; platform accounts can get a signed webhook when a company's onboarding stage changes, see /docs), Peppol BIS 3 specific rules (PEPPOL-EN16931-*).mode=liveanswers HTTP 403 with what is missing until the company's mandate, KYC check and sending account are in place. You can record your customers' Peppol mandates: see Going live. We are not a certified Peppol Access Point or French PA ourselves; live sending goes through a certified partner (e-invoice.be). - Belgium: structured B2B e-invoicing via Peppol (BIS Billing 3.0) mandatory between Belgian VAT-registered businesses since 1 January 2026; penalties apply since 1 April 2026. Source: FPS Finance.
- Poland: KSeF (national clearance, FA(3) XML) mandatory for large taxpayers since 1 February 2026 and for other VAT taxpayers since 1 April 2026; micro taxpayers from 1 January 2027. Sources: Ministry of Finance, ksef.podatki.gov.pl.
- France: every business must be able to receive e-invoices since 1 September 2026 (large and mid-size companies also issue); SMEs and micro-businesses must issue from 1 September 2027, through an accredited platform (plateforme agréée). Source: impots.gouv.fr.
- Germany: all businesses must be able to receive EN 16931 e-invoices since 1 January 2025; issuing is mandatory from 1 January 2027 for prior-year turnover above EUR 800,000 and from 1 January 2028 for everyone (XRechnung or ZUGFeRD/Factur-X). Source: Federal Ministry of Finance FAQ.
- EU (ViDA): e-invoicing and digital reporting for intra-EU B2B from 1 July 2030. Source: European Commission.
- Evidence receipt: a compact JWS (EdDSA/Ed25519) over the SHA-256 of the exact XML, the VIES result (with consultation number when available), the validation summary, the route and the transport result. Public key: /einvoice/evidence-key. In sandbox mode the receipt says
sandbox: trueand does not prove delivery. - Built for AI-built apps and agents: one JSON shape, plain-English errors with official rule IDs, an MCP tool (
send_einvoice_sandbox) and pay-per-call via x402 or a monthly API key.
Examples
Sandbox send (nothing is transmitted)
curl -s https://api.wsystem.dev/einvoice/sample > invoice.json
curl -X POST https://api.wsystem.dev/einvoice/send \
-H 'Content-Type: application/json' \
-d "{\"mode\":\"sandbox\",\"transport\":\"mock\",\"invoice\":$(cat invoice.json)}"Response (shortened)
{"status": "simulated", "sandbox": true,
"notice": "SANDBOX: nothing was transmitted ...",
"steps": [{"step": "verify_buyer_vat"}, {"step": "screen_buyer_sanctions"}, {"step": "create_and_validate"}, {"step": "route_lookup"}, {"step": "transmit", "result": "simulated"}],
"invoice": {"number": "INV-2026-001", "sha256": "..."},
"evidence": {"jws": "eyJhbGciOiJFZERTQSIs...", "alg": "EdDSA", "kid": "wsys-ev-2026-10"}}Can I e-invoice this company?
curl 'https://api.wsystem.dev/einvoice/route?id=BE0403170701'Sandbox transports
POST /einvoice/send takes a transport field. All three are sandbox only: nothing reaches a real buyer. Real sending is mode=live (see
| transport | What happens | What you get back |
|---|---|---|
mock(default) | The whole flow runs (VIES, sanctions screen, EN 16931 create and validate, route lookup), then the transmit step is simulated. Nothing leaves W System. Your invoice.format is kept. | status: "simulated", transmission.transmitted: false, a sim- message id, the XML and a signed receipt. |
recommand | The validated Peppol BIS 3 UBL is really submitted to the Recommand playground (the sandbox of a certified Peppol access point). It is addressed to W System's own sandbox participant, never to your buyer. Playground sends do not reach the production Peppol network. | status: "sandbox_submitted", transmission.transmitted: false, sandbox_transmitted: true, provider.document_id and delivery_status, submitted_sha256 (equals invoice.sha256), all signed into the receipt. |
e-invoice-be | The UBL is uploaded to an e-invoice.be sandbox company (test mode) and sent to W System's own sandbox participant, never to your buyer. Test mode sends nothing over Peppol; e-invoice.be emails the UBL to W System's sandbox contact instead. | status: "sandbox_submitted", transmission.transmitted: false, sandbox_transmitted: true, provider.document_id and provider.state (e.g. SENT), submitted_sha256, signed into the receipt. |
- Partner transports switch
invoice.formattopeppol-bis3and add a warning, because the partner access points accept Peppol BIS Billing 3.0 UBL (the sample invoice is XRechnung, so you will see this warning). - The buyer's Peppol ID, if any, is only recorded as
intended_recipient; nothing is addressed to it. Sandbox sends never count as live transmissions. recipient_check:"warn"(sandbox default: a buyer not registered on Peppol is a warning) or"strict"(refused with HTTP 422recipient_not_on_peppol, nothing transmitted, 5 units instead of 8). Live sends are always strict. See docs.- Use test data with
recommandande-invoice-be: the XML is stored in W System's sandbox account at that partner. - Errors: partner refuses the document → HTTP 422
transport_rejected; partner sandbox unreachable → HTTP 502. Nothing is delivered in either case. - MCP: the
send_einvoice_sandboxtool takes the sametransportargument (mock,recommandore-invoice-be).
Try it: submit the sample invoice to the Recommand playground
No key needed (uses 1 of your 20 free calls today).
curl -s https://api.wsystem.dev/einvoice/sample > invoice.json
curl -s -X POST https://api.wsystem.dev/einvoice/send \
-H 'Content-Type: application/json' \
-d "{\"mode\":\"sandbox\",\"transport\":\"recommand\",\"invoice\":$(cat invoice.json)}"Real response from the live API on 19 October 2026 (trimmed: XML, full JWS and some fields left out):
{
"status": "sandbox_submitted",
"sandbox": true,
"notice": "SANDBOX: the validated UBL was really submitted to the Recommand sandbox (a Peppol access point's test environment) ... It was addressed to W System's own sandbox company, not to the buyer, and nothing reached the production Peppol network. For a real Peppol send use mode=live (after a Peppol mandate and KYC review).",
"receipt_id": "ev_6a1c5985118a47c38f174c9e0f9b7851",
"invoice": {
"number": "INV-2026-001",
"format": "peppol-bis3",
"sha256": "d3f281e46ae4b1bcb20d90807c9384e312a0f0672680ce6bdbaf4fb954236170"
},
"transmission": {
"transport": "recommand",
"transmitted": false,
"sandbox_transmitted": true,
"submitted_sha256": "d3f281e46ae4b1bcb20d90807c9384e312a0f0672680ce6bdbaf4fb954236170",
"sandbox_recipient": "0208:0999120091",
"intended_recipient": null,
"status": "sandbox_delivered",
"provider": {
"name": "Recommand",
"environment": "playground",
"document_id": "doc_01M58GRTDPQ3VB9Q663BFDSQAG",
"delivery_status": "delivered"
}
},
"steps": [
{"step": "verify_buyer_vat", "result": "valid"},
{"step": "screen_buyer_sanctions", "result": "no_match"},
{"step": "create_and_validate", "result": "valid", "errors": 0},
{"step": "route_lookup", "result": "E-mail or Peppol"},
{"step": "transmit", "result": "sandbox_delivered", "transport": "recommand"}
],
"warnings": [
"invoice.format 'xrechnung' was switched to 'peppol-bis3': partner Peppol access points accept Peppol BIS Billing 3.0 UBL.",
...
],
"xml": "<?xml ... (full Peppol BIS 3 UBL, left out here)",
"evidence": {"jws": "eyJhbGciOiJFZERTQSIs...", "alg": "EdDSA", "kid": "wsys-ev-2026-10"}
}Going live: the Peppol mandate flow
To send real Peppol invoices on behalf of your customers, each sending company gives W System a mandate once. You can build that step into your own onboarding today with three API calls; the sandbox works without it. Live transmission runs over production Peppol through our certified access-point partner: after the mandate, W System checks the company, sets up its Peppol sending account and switches live sending on for it. A Peppol plan is needed (Peppol pricing).
- Get an API key. From the pricing page. The same key works for every live endpoint today (validate, create, route, VAT, KYB) and for the sandbox send.
- Fetch the current terms.
GET /einvoice/mandate-termsreturns the exact terms text, itsversionandsha256, and links to the Peppol mandate terms and the data processing agreement. - Show them to your customer. In your onboarding, show that exact text to someone who can bind the company (for example the managing director) with two checkboxes: they accept the terms, and they confirm they are authorised. No wet or qualified signature is needed.
- Record the mandate.
POST /einvoice/mandateswith the company details, the signer,terms_version,terms_sha256,accept: trueandauthority_confirmed: true. You get HTTP 201, amdt_id and an Ed25519-signed receipt. W System stores who accepted which version, when, from which IP address and user agent. - W System checks the company. The VAT number is checked in VIES straight away (
vies_status). Before anything goes live we also check the company register and sanctions lists (kyc_statusstayspendinguntil then), then set up a Peppol sending account for the company with our certified access-point partner. - Send live.
POST /einvoice/sendwithmode: "live"and the same API key that recorded the mandate. W System creates and validates the invoice, checks that the buyer is on Peppol, and hands it to the access point from the company's own sending account. The response carries the partner's document id and state, and a signed receipt. Live sending is switched on per company once the mandate and KYC review have passed; it was tested end to end with real production Peppol sends between W System's own Peppol IDs (10 Nov 2026). ThenGET /einvoice/live/{document_id}shows the delivery state andGET /einvoice/inboxlists invoices the company received on Peppol.
1. Fetch the terms to show
curl -s https://api.wsystem.dev/einvoice/mandate-terms -H "X-API-Key: $WSYSTEM_KEY"{
"version": "1",
"sha256": "f44a72ae5e66b97738353519cdd0e446ea1c119e38978d126e79e51304b5275e",
"text": "# W System Peppol mandate and live sending terms ...",
"terms_url": "https://wsystem.dev/legal/peppol-mandate-terms",
"dpa_url": "https://wsystem.dev/legal/dpa",
"how_to_accept": "Show this exact text to a person authorised to bind the company, then POST /einvoice/mandates ..."
}2. Record the acceptance
curl -s -X POST https://api.wsystem.dev/einvoice/mandates \
-H "X-API-Key: $WSYSTEM_KEY" -H 'Content-Type: application/json' \
-d '{"company_name": "Muster NV", "company_id": "BE0403170701",
"peppol_id": "0208:0403170701",
"company_email": "[email protected]", "company_phone": "+32 2 123 45 67",
"signer_name": "An Peeters", "signer_role": "Managing Director",
"terms_version": "1",
"terms_sha256": "f44a72ae5e66b97738353519cdd0e446ea1c119e38978d126e79e51304b5275e",
"accept": true, "authority_confirmed": true}'Response from a test run of the API on 20 October 2026 with example data (trimmed: contact details, IP address, user agent and the full JWS left out):
HTTP 201
{
"id": "mdt_9762f43bde544a8e96021d2544abd850",
"company_name": "Muster NV",
"company_id": "BE0403170701",
"country": "BE",
"peppol_id": "0208:0403170701",
"signer_name": "An Peeters",
"signer_role": "Managing Director",
"terms_version": "1",
"terms_sha256": "f44a72ae5e66b97738353519cdd0e446ea1c119e38978d126e79e51304b5275e",
"vies_status": "valid",
"kyc_status": "pending",
"status": "active",
"created_at": "2026-10-20T07:06:01Z",
"receipt": {"jws": "eyJhbGciOiJFZERTQSIs...", "alg": "EdDSA", "verify_with": "GET /einvoice/evidence-key"},
...
}- If the terms changed after you fetched them, the API answers HTTP 409
terms_mismatchwith the current version and hash; fetch and show them again. GET /einvoice/mandates/{id}returns the record (only to the API key that created it);POST /einvoice/mandates/{id}/revokewithdraws it.- Mandate routes need an API key (HTTP 401 without one). They are listed in the OpenAPI spec.
POST /einvoice/mandates/{id}/revokealso closes the company's Peppol sending account, so nothing more can be sent in its name.- A company that is already registered on Peppol with another provider is moved over with the standard Peppol transfer. If it later ends the mandate and moves its registration to another provider, our partner charges a one-time release fee of up to EUR 100 excl. VAT, which we pass on at cost and only when the company asks for that transfer.
3. Send live
# invoice.json: your invoice JSON (same shape as GET /einvoice/sample),
# with the mandated company as seller (invoice.seller.vat_id)
curl -X POST https://api.wsystem.dev/einvoice/send \
-H "X-API-Key: $WSYSTEM_KEY" -H 'Content-Type: application/json' \
-d "{\"mode\":\"live\",\"invoice\":$(cat invoice.json)}"The live call is the sandbox call with mode set to live and your API key. Every refusal says exactly what is missing, and nothing is sent when any check fails:
| HTTP | error | Meaning |
|---|---|---|
| 501 | live_not_available | Live sending is paused for all accounts (maintenance only). Use mode=sandbox. |
| 401 | api_key_required | No valid X-API-Key header. |
| 400 | bad_input | invoice.seller.vat_id is missing. |
| 403 | mandate_required | No active mandate for the seller's VAT number under this API key. |
| 403 | terms_update_required | The mandate was accepted under older terms; record it again with the current terms. |
| 403 | peppol_plan_required | The API key is not on a Peppol plan (Peppol pricing). |
| 403 | company_limit | More mandated companies than the plan covers. |
| 403 | kyc_pending | The mandate is recorded and W System's company check is not finished yet. |
| 403 | sending_account_pending | The check is approved and the company's Peppol sending account is still being set up. |
| 403 | live_not_enabled_for_account | The sending account is ready; W System switches live sending on after a final check and emails you. |
| 422 | recipient_not_on_peppol | The buyer is not registered on Peppol, so there is nobody to deliver to. Send that invoice another way. |
| 503 | recipient_lookup_failed | The Peppol lookup (SML/SMP) for the buyer failed, so we can't tell whether it is on Peppol. Nothing was sent or charged; retry after the Retry-After time (60 s). |
A successful live send returns status live_sent or live_transit, sandbox: false, the partner's provider.document_id and the mandate_id. Only those states count as transmitted invoices on your own usage (GET /einvoice/usage, with your API key; it never returns anyone else's counts). The signed receipt records the hand-off to the access point, not the buyer's receipt.
4. Delivery state and received invoices
GET /einvoice/live/{document_id}(same API key): the access point's state for a live send, for exampleSENTorFAILED. A failed send is not charged and does not count on your usage.GET /einvoice/inbox: invoices your mandated companies received on Peppol (newest first; each received document is billed per document like a sent one).GET /einvoice/inbox/{document_id}/ubl: a short-lived signed link to download that invoice's UBL XML.- Document status and incoming invoices have no webhooks yet: poll these routes (platform accounts can get a signed webhook when a company's onboarding stage changes, see /docs). They are listed in the OpenAPI spec.
Pricing
| Channel | Price |
|---|---|
| Free tier | 20 calls/day per IP across all endpoints, no key |
| x402 POST /einvoice/send (sandbox) | $0.08 USDC per call (same as create); a send blocked by the preflight is not charged |
| API key plans | Starter EUR 19/month (5,000 units), Pro EUR 49/month (25,000 units); /einvoice/send uses 8 units, or 5 when the preflight blocks it |
| Live Peppol sending | From EUR 19/month + EUR 0.25 per document, lower with volume (wsystem.dev/pricing/peppol) |
Questions and answers
Can I send real e-invoices today?
Yes, over Peppol, company by company: once a company has accepted the Peppol mandate and passed our KYC check, mode=live sends its invoices through our certified access point partner. KSeF production and French platform delivery are not live yet (KSeF works in the KSeF TEST environment only); the sandbox runs the whole flow on every plan.
How do I go live on Peppol?
Subscribe to a Peppol plan (wsystem.dev/pricing/peppol), record each sending company's Peppol mandate with POST /einvoice/mandates, and W System runs the KYC check, sets up the company's Peppol sending account and switches live sending on for it. We email you when it is on. Questions: [email protected].
Which countries does live sending cover?
Peppol today (Belgium and the other Peppol countries). Poland KSeF works in the KSeF TEST environment only for now (not production), and France will follow through a partner; this page will say when they are live.
Is this tax advice?
No. It is technical processing against official rule sets and directories.
Do you store invoices?
With the default mock transport, no invoice content is stored: the XML and the signed receipt are returned to you and not kept. With transport=recommand or transport=e-invoice-be, the invoice XML is stored in W System's own sandbox accounts at Recommand or e-invoice.be (e-invoice.be test mode also emails a copy to our mailbox), so use test data only. Usage metering keeps one row per completed create, validate or send call: time, endpoint, mode, transport, status, a transmitted flag, HTTP status and a payer tag (a short hash of your IP address or API key, or the label x402 for x402-paid calls). It holds no XML, invoice numbers, amounts or party details. The free tier also keeps a daily call counter per IP address, and buyer VAT and Peppol lookups use the same result cache as the standalone checks.
XRechnung API for invoicing software (create, KoSIT validation, Peppol send) and check if the buyer is on Peppol before sending.
Related
- Free e-invoice validator (XRechnung, ZUGFeRD, Factur-X, UBL)
- Slovakia eFaktúra 2027 for invoicing software
- EU e-invoice API: validate, create and route EN 16931 invoices
- One-call KYB check for EU companies
- MCP server for EU VAT validation (VIES), EORI, company registry and sanctions
- API reference (OpenAPI)
Facts and competitor details checked 2026-10-17. W System is the maker of this product. Not affiliated with the European Commission. Not legal or tax advice.