← Back to the blog
FACe Published May 5, 2026 · 8 min read

Invoicing the Spanish Public Administration with FACe step by step

If you work with a city council, a regional government or any state agency in Spain, you cannot just send a PDF and call it a day. Here is how to do it right and get paid without months of back-and-forth.

What is FACe and why does it exist?

FACe is the General Public Entry Point for Electronic Invoices of the Spanish General State Administration. It is the common gateway that almost every public body is connected to. It exists because Law 25/2013 requires invoices to public administrations to be electronic and signed, and because having a thousand separate channels was unmanageable.

Summary: to get paid by the government you need three things — correct format, valid signature, and delivery to FACe (or to the body’s authorized portal).

1. The format: Facturae 3.2.2

The standard is Facturae, version 3.2.2 (3.2.1 is still accepted by many administrations, but 3.2.2 is current). It is an XML with an official schema published by the tax agency and the Ministry.

What matters about Facturae versus a PDF:

2. DIR3 codes: the most misunderstood piece

An invoice to a public administration must be addressed to three organizational units, not to “the city council” in the abstract:

Each is identified by a 9-character alphanumeric DIR3 code. They are mandatory and the customer must provide them: ask in writing before issuing anything. No DIR3, no submission.

Common mistake: using the accounting office DIR3 in all three fields. It works in some small administrations, but big ones will reject it. Always ask for the three codes separately.

3. The signature: XAdES-BES

The Facturae XML is signed with XAdES-BES, a variant of advanced XML signature defined by ETSI. The key point: you need a qualified digital certificate in the name of your company or yourself (freelancer). FNMT, Camerfirma, ANCERT, etc. all work.

The signature is embedded into the XML itself as a <ds:Signature> node with its references and properties (QualifyingProperties). If the administration detects an invalid certificate, a revoked one or a mismatching signature, the invoice is rejected.

<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
  <ds:SignedInfo>...</ds:SignedInfo>
  <ds:SignatureValue>...</ds:SignatureValue>
  <ds:KeyInfo><ds:X509Data>...</ds:X509Data></ds:KeyInfo>
  <ds:Object><xades:QualifyingProperties>...</xades:QualifyingProperties></ds:Object>
</ds:Signature>

4. The submission: SOAP to FACe

FACe exposes a SOAP 1.1 web service. The main operation is enviarFactura:

You send the signed XML in Base64 plus a contact email. The response returns a code (1200 = accepted) and a registration number. That number is your acknowledgement: with it you can query status anytime.

5. After submission: status and payment

FACe doesn’t pay; it registers and routes. The invoice can move through these states:

  1. Registered: FACe accepted and routed it to the body.
  2. Registered in RCF: the body picked it up in its Accounting Invoice Registry.
  3. Conformed: the managing body approved it.
  4. Paid: the processing unit has wired the payment.
  5. Rejected / Cancelled: with reason.

Common mistakes (and how to avoid them)

Special cases

Invoices to public-owned companies or local entities with their own portal

Some big ones (Adif, Renfe, several regional ones) have their own Public Entry Point. If they’re connected to FACe, FACe works. If not, submission goes to their specific portal with the same signed Facturae format.

Invoices below €5,000

Law 25/2013 allows some administrations to exempt invoices below €5,000 from electronic invoicing. Ask the body: in many cases they still require Facturae.


FacturaOk implements the full pipeline: Facturae 3.2.2 generation, XAdES-BES signature with your real certificate (loaded securely from AWS Secrets Manager), SOAP submission to FACe in production and sandbox, and full status tracking. If a sandbox delivery fails, we mark it honestly as sandbox unreachable instead of faking success.

Start invoicing the public sector

Real sandbox against FACe pre-production. Switch to live in one click when you’re ready.

Try it free