What Is an XML Invoice Format?
In much of Europe, an invoice is read by software before a person ever sees it.
An XML invoice format is a way of writing a bill so a machine can read it, with every field wrapped in a labelled tag instead of printed on a page. The buyer’s system pulls out the invoice number, the tax and the line items without anyone typing them again.
India’s own e-invoice system does not use XML at all. It uses JSON, so if someone is asking you for an XML invoice, the request is almost certainly coming from outside India.
The Main XML Invoice Standards
XML is the wrapper, not the rulebook, so each market has settled on its own dialect:
- UBL, maintained by OASIS and the format behind the PEPPOL network used across much of Europe.
- XRechnung, the German public-sector standard.
- FatturaPA, Italy’s national format, mandatory for business invoicing there since 2019.
- Factur-X, the Franco-German hybrid, which carries the XML inside a readable PDF.
PEPPOL is worth separating out, because it is a network rather than a format: it carries UBL documents between businesses under a shared set of rules, which is how a supplier in one country can invoice a buyer in another without the two of them agreeing a file layout first.
An invoice written to one of these is not readable by another without conversion. That is why “send it as XML” is never a complete instruction on its own.
XML Invoice vs India’s E-Invoice Format
Both are structured, machine-readable bills. The similarity ends at the file.
| Aspect | XML invoice | India’s e-invoice |
|---|---|---|
| Syntax | Tagged XML | JSON |
| Schema | UBL, XRechnung and others | Schema INV-01 |
| Sent to | The buyer, or a network | The IRP, which returns an IRN |
| Governs | The buyer’s country rules | The CGST rules |
The IRP in that table is the Invoice Registration Portal, and the IRN it hands back is the number that makes the invoice count. The Indian side is not optional either. Once turnover has crossed Rs 5 crore in any financial year from 2017-18 onwards, e-invoicing applies to your B2B supplies, your exports and anything you sell into a special economic zone, whatever your buyer prefers.
XML Invoice Format Example
Take a brassware exporter in Moradabad shipping to a buyer in Germany.
| Field | What is needed |
|---|---|
| Buyer asks | An XRechnung file, because they are a public body |
| India asks | The same sale reported to the IRP as JSON |
| Overlap | None, the two files go to different places |
| Practical fix | Billing software for the Indian side, a conversion service for the German one |
| Watch out | Export invoices still carry their own GST treatment |
Note: this is an invented example for illustration only. What your buyer requires depends on their country and their own contract.
What This Actually Means for an Indian Business
For most readers, nothing. A grocery chain in Nashik or a salon in Indore will not touch XML invoicing, because no Indian rule asks for it and no domestic buyer expects it.
It becomes real in one situation: you sell to a business abroad whose own law mandates a structured invoice. Then you have two obligations running side by side, and neither replaces the other. Your Indian tax invoice and its IRN still have to exist, and the buyer’s XML file is extra work on top.
The conversion is rarely something you build yourself. Either the buyer’s portal takes a simpler upload and produces the XML at their end, or a service sits in between and does the mapping, much as it does for machine-readable invoice data generally.
Treat any “XML export” button in your accounting software with the same care. It usually produces a file for another accounting system, not something a tax authority will accept.
Generate E-Invoices India Actually Accepts
The confusion we run into is understandable enough. Owners hear “e-invoice” and “XML” in the same sentence at a trade fair and assume the two belong together in India, when the format here was never XML.
Petpooja Invoice handles e-invoice generation and e-way bill generation alongside GST calculation on every bill. That covers what Indian law requires of you. A GST invoice template will show you the fields that have to be on the document itself.
If a buyer overseas asks for XML, treat it as a separate job with a separate tool.
Frequently Asked Questions
No. India’s e-invoice runs on JSON under Schema INV-01, and the Invoice Registration Portal will not accept XML. XML is the norm in Europe, not here.
Both are structured formats a machine can read. XML wraps each field in a tag while JSON uses name and value pairs, and the choice is made by whoever receives the file, not by you.
No. That export is almost always meant for another accounting system. Filing and e-invoicing in India both need the government’s own JSON format.
Only if the overseas buyer’s own rules require one, which is common in the European Union. It is an additional file, not a replacement for your Indian e-invoice.
It is a hybrid. Factur-X puts an XML file inside a PDF, so a person sees the readable page and the buyer’s software reads the tagged data underneath.
