The wedge
Every country invented its own e-invoicing scheme in the last five years. Saudi Arabia's Fatoora, India's IRP with IRN + QR, Italy's SdI portal, France's Chorus Pro. Non-compliance = fines starting at 2% of invoice value; some regimes block the payment counterparty from claiming input tax entirely. Most invoicing tools sell you a PDF that isn't legally sufficient in half the world. Odexy E-invoice submits every issued invoice to the local tax authority automatically the moment sales.invoice.issue fires.
What ships today
- Multi-scheme adapters — Fatoora Phase 1 + Phase 2 (Saudi Arabia, ZATCA), IRP + IRN + QR (India, GSTN), SdI (Italy, Agenzia delle Entrate), Chorus Pro (France, DGFiP). Country-specific adapter pattern lets new schemes drop in with an XML formatter + submission handler.
- Automatic on-issue submission — on
sales.invoice.issued, if the org has an active e-invoice profile for the invoice's country, the submission fires. Retry-on-failure with exponential backoff. - QR + digital signature — for schemes that require them (Fatoora, IRN), the QR code is generated + embedded in the invoice PDF; digital signatures use per-org DSC (digital signature certificate) that the operator uploads.
- DSC expiry tracking — dashboard chip + daily cron nags the operator when a DSC is 30 / 15 / 7 days from expiry.
- Submission portal integration — where the tax authority provides sandbox + production endpoints, the operator picks one; test submissions in sandbox, real filings in prod, with per-endpoint credentials.
- Retry inspector — per-invoice submission timeline: sent / accepted / failed with the government API's exact error message + a jump-to-fix action.
- Cancel + credit — when an invoice is voided, the country-specific cancellation flow fires (e.g. IRN cancellation within 24h of generation).
- Reconciliation — daily sweep against the government portal's records catches drift between what we think we submitted vs what the portal has.
How it integrates
- Sales —
sales.invoice.issuedis the trigger. E-invoice status back-writes ontoinvoices.einvoiceSubmissionStatus+einvoiceIrn(or country-specific ID) fields. - CRM — the customer's country drives which adapter fires; multi-country ops file each invoice via the right scheme automatically.
- Documents — the issued PDF gets its QR + IRN embedded via
renderContractPdf's /renderInvoicePdf's post-processing pass. - Storage — submission responses (government XML acknowledgements) archive to Storage for audit retention.
- Notifications — submission failures notify the finance team (email + in-app) with the government's error explanation + a jump-to-fix action.
How the AI helps
- "Show every invoice this month where the e-invoice submission failed + explain the error patterns."
- "Which DSC expires next? Draft a renewal reminder to the operator."
- "Reconcile our invoice count vs the SdI portal's count for October."
- "The customer says they didn't get the IRN for invoice INV-2026-000123 — check submission status + the government portal."
Built for scale
- Sandbox + production per-country — operators enable sandbox mode per scheme, submit test invoices, then flip to prod when the government's certification test passes.
- Retry-with-backoff — transient failures (government API 5xx, network) retry automatically; permanent failures (validation errors, missing fields) surface for operator fix.
- Audit chain — every submission logs the exact request + response payload hashed into
einvoice_submissions. Multi-year retention friendly for tax authority audit. - Multi-adapter roadmap — Peppol (Belgium, Malaysia, Poland, Australia), Mexico's CFDI, Brazil's NF-e, Chile's DTE queued per operator demand.
- Sub-processors listed — the tax authority + certificate authority (for DSCs) are named sub-processors in your DPA; we handle the disclosure.
