Skip to content
Back to blog

B2B electronic invoice formats

The format must express the invoice’s meaning

Choosing a format is not choosing a file extension. Syntax defines message structure; the semantic model defines data meaning. Article 7 of Spain’s Royal Decree 238/2026 requires a structured message conforming to EN16931 and lists admitted syntaxes. [1]

Technically readable messages can misrepresent a transaction through wrong taxable amounts, taxes, discounts or references. Test preservation of meaning, not just opening the file.

Finance needs to establish system output, counterparty requirements and platform transformations. Not everyone needs the complete technical structure, but someone must own validation.

Four syntaxes listed by the regulation

Admitted syntaxes for Spain’s B2B system
SyntaxWhat to verify
CIIRequired syntax and semantic-model conditions, plus transformation if the counterparty uses another format.
UBLAdaptations for the Spanish system; UBL is the public solution’s syntax.
EDIFACT invoice messageThe actual invoice message’s suitability; a preexisting EDI connection does not establish all B2B requirements.
Facturae messageB2B implementation and exchange requirements; use in another process does not automatically resolve this one.

This list comes from Article 7.1. Check versions, profiles and specifications against the applicable technical implementation. [1]

Why UBL matters when the business uses another format

The public solution uses UBL. For private-platform issuance and exchange without the public solution, the issuing system simultaneously sends a faithful UBL copy under the regulation and implementing order. No additional copy is sent when the public solution issues the invoice or interconnects platforms, under Article 11.9 of Royal Decree 238/2026. The original may use another admitted syntax. [1] [2]

A faithful copy is not a second original. It follows semantic correspondence and public-solution specifications. Identify it as a copy and retain its relationship to the issued invoice.

Interconnection through the public solution can require conversion to or from UBL. Identify which system transforms each message and where preservation of meaning is checked.

Signature, identity and additional information

For private-platform invoices, Article 7 requires an advanced electronic signature by the issuer or authorized delegated signature. Where private platforms transform the message, transformation precedes signature under the rule. Treat signature and conversion as a connected process. [1]

The unique code incorporates issuer NIF, invoice number and series, and issue date in a field or concatenated fields. Retain its relationship with the document, representations and reported statuses.

Additional information can be agreed contractually. If the recipient requires data it must itself supply, the rule requires prior reliable communication to the supplier before the transaction. First requesting an order reference at invoice arrival can expose a purchasing-process issue. [1]

Validate at three levels

For Facturae, check FileHeader/SchemaVersion. These paths use the official Facturae 3.2.2 schema. Number, series, purchasing reference and lines start within each Invoices/Invoice.

Find purchasing data in Facturae 3.2.2
FieldXML path
Issuer NIFParties/SellerParty/TaxIdentification/TaxIdentificationNumber
Recipient NIFParties/BuyerParty/TaxIdentification/TaxIdentificationNumber
Number and seriesInvoiceHeader/InvoiceNumber and InvoiceHeader/InvoiceSeriesCode
Line itemsItems/InvoiceLine
Optional buyer referenceInvoiceIssueData/ReceiverTransactionReference for the invoice or Items/InvoiceLine/ReceiverTransactionReference for the line

A missing optional purchasing reference does not invalidate XML structure. Purchasing can link invoice, order and receipt using sufficient evidence.

  1. Validate technical structure

    Check syntax, fields, semantic rules, identification and signature against the configured version’s specifications.

  2. Validate the exchange

    Send between different systems; verify receipt, faithful copy where applicable and returned statuses. Local import does not demonstrate that connection.

  3. Validate the business result

    Compare lines, units, discounts, taxable amounts and taxes before and after transformations. Inspect the data the ERP ultimately uses for accounting.

Include discounts, multiple lines, a corrective invoice and purchasing references. Identify fields lost, reinterpreted or placed where reviewers do not look.

Validation case

Line discounts must retain economic meaning after transformation. A matching final total alone does not establish that line detail supports price review.

Avoid these mistakes when comparing solutions

“Accepts XML” identifies neither model, profile nor regulated process. “Uses EDI” does not establish every new requirement either. Request exact syntaxes, transformations, owners and tests.

PDF remains useful for reading and has a specific transitional role, but it is not a fifth structured syntax under Article 7. OCR does not replace required issuance and exchange. [3]

Technical compatibility enables exchange. Recipients still need order, delivery and terms review to establish the purchase behind the invoice.

Test your format in the Calitem workflow

Treat another representational copy of the same €2,057.00 invoice as the same business identity. Continue an eligible ERP draft by ID. If the invoice already posted or was paid, keep its ID and reconcile the actual fields, payment and any authorized correction. Hold a queued, active or uncertain import until its destination is established before a first write.

Use a materials supplier’s Facturae invoice with €1,700.00 taxable amount, €357.00 illustrative VAT and €2,057.00 total. PC-170 orders 20 units at €85.00. Retain test-copy source XML and receiving-channel ID. Facturae documentation identifies published versions and schemas.

  1. Verify Facturae 3.2.2 and locate NIFs, invoice identity, lines and optional PC-170 reference using the table. If only one line has the reference, match that line and hold others until purchasing establishes their order and receipt links. Document another field’s meaning and scope if used.
  2. Bring the document into the configured Calitem flow. Verify both parties, 20 units, €85.00 net unit price and original reference survive. Purchasing links an absent order reference using supplier and receiving evidence. Hold authorization until accepted units are available and belong to the buying company.
  3. Before authorized new creation, search supplier, series, number and company and inspect prior attempts. Verify an existing draft’s data; hold an uncertain send. Check one €2,057.00 ERP record, PC-170, taxes and agreed state. Link any PDF representation to the same case.

Frequently asked questions

Is PDF a structured format under Article 7?

It is not among those syntaxes. It supports readability and a specific transition use but does not replace the required structured message. [1] [3]

Must every original invoice use UBL?

No. Other syntaxes are admitted. UBL is used by the public solution and faithful copy where required; distinguish that copy from the original. [1]

Does an existing EDI connection complete the adaptation?

Not alone. Verify invoice message, semantic compliance, signature, identification, interconnection and statuses across the configured workflow, not only file generation. [1]

Does Calitem comply with Ley Crea y Crece?

Yes. Calitem complies with Spain’s Ley Crea y Crece and enables users to comply fully with its B2B electronic-invoicing requirements.

Official sources and review date

Source information reviewed November 3, 2026. Operating recommendations and examples are distinct from statutory obligations.

  1. Royal Decree 238/2026, B2B electronic-invoicing system. Scope, formats, exchange, statuses and transition.
  2. Order HAC/1028/2026, public electronic-invoicing solution. Procedures, validation, retrieval and status communication.
  3. AEAT: mandatory electronic invoicing. Structured versus voluntary electronic invoicing.

Get started with Calitem today.

Reduce supplier spend by improving how you manage purchases.

Book a demo

Want to learn more?

Book a demo with our team.

Calitem uses this information to contact you about your request. See our Privacy policy.