An Invoice a Person and a Machine Both Read
Create an invoice a person reads, carrying inside the same file the data accounting reads on its own.
See It in a Real PDF
Factur-X: The Electronic Invoice
The electronic invoice French law has required since September 2026: one file, a page a person reads and the same invoice inside it as XML. Nothing to reconcile afterwards, because there is only ever one invoice.
Open the PDF The Whole Example
Also shown in: An Invoice That Asks Before It Claims
Summary
An invoice has two audiences. A person looks at it and sees the lines, the amounts, the date. Accounting software wants the same figures sorted into boxes, so it can book them without anybody retyping. France is bringing this in for businesses step by step, and to the eye the file stays a perfectly ordinary invoice.
Technically
Written at the top level of a request, under
"invoice"
invoice adds the invoicing XML to the document as an attachment, associates it through /AF, and states what it is: the profile of the standard it follows, its version, its /AFRelationship to the document, and when the data was last changed. The XML arrives alongside the request, in a form part carrying the name given here. An invoice wants the archiving standard that allows an attachment of any kind, so the request states "archive": "pdfa3b". The attachment is always named factur-x.xml, the name the invoicing standard fixes.
Request Schema
-
invoice— object, optional, absent by default. -
invoice.xml— string, required. The name of the supplied part holding the XML. A name no part carries is refused. -
invoice.profile— string, required, spelled as the standard spells it. Five values:"MINIMUM","BASIC WL","BASIC","EN 16931","EXTENDED". -
invoice.version— string, optional,"1.0"by default. The version of the specification the XML follows. -
invoice.relationship— string, required, with no default. Five values:source,alternative,data,supplement,unspecified. An invoice is neversupplementnorunspecified, and under theMINIMUMandBASIC WLprofiles, whose invoice holds no lines, it isdataalone, the page being the invoice; any other pairing is refused. -
invoice.issued— string, required, in ISO 8601. When the invoice data was last changed, not when the PDF was created. -
The request states
"archive": "pdfa3b","pdfa3u","pdfa3a"or"pdfa4f": with no archiving standard the invoice is refused, and under any other part too, since none of them carries a file of any kind. -
The attached file is named
factur-x.xml.
A Whole Request That Creates a PDF
One name below stands for a font file: put the encoded file in its place, or send the file itself beside the description, as a supplied part of the same call. One page carries a real font already encoded, and its request posts as it stands.
{
"archive": "pdfa3b",
"invoice": {
"xml": "invoice_xml",
"profile": "MINIMUM",
"relationship": "data",
"issued": "2026-08-08T09:30:00+02:00"
},
"output_intent": { "identifier": "sRGB", "info": "sRGB IEC61966-2.1" },
"metadata": {
"title": "Invoice 2026-014",
"created": "2026-08-08T09:30:00+02:00"
},
"fonts": [{ "name": "body", "data": "PASTE_THE_FONT_FILE_BASE64_HERE" }],
"items": [
{
"type": "text",
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 768 },
"content": ["Invoice 2026-014 — total 5 100.00 EUR"],
"font": "body",
"font_size": 16
}
]
}
The document as a whole
The Numbers Reading Software Shows A Hundred Letters in a Single File What the Document Says about Itself What the Document Says about Itself, Said Once Text Nobody Can Copy The Notes a Program Leaves in the File for Itself The Notes a Program Leaves on One Page The Data a Program Hangs on a Run of Ink A File Still Readable Decades from Now The Print Standard the Document Claims The Variable Print Standard the Document Claims The Password That Opens It, and What May Be Done with It The Address Relative Links Are Read Against The PDF Version the File Declares The Extensions to PDF the File Says It Uses What a Picture Says about Itself, and How It Is Read The Attachments the Document Carries Beside Its Pages Files the Document Names without Carrying The Attachments Shown as a Portfolio Which Attachments a Page Claims Which Attachments a Font Claims The Identity Card a Single Font Carries Which Attachments the Document's Card Claims A Document Card Written Elsewhere The Areas of a Page a Reader Measures In The Identity Card a Single Page Carries The Accessibility Standard the Document Claims The Standards the Finished Document Is Measured Against
Where to Go Next
Every JSON key of a request, in one page The other forty-one settings of a request