Skip to content
Start free
Documents

How long to keep electronic invoices in Costa Rica (and which file actually counts)

Five years. And what has to be kept is not the PDF: it is the XML. The PDF has no tax effect.

6 min readTicuenta
The obligation: store and keep, on whatever electronic medium you prefer, every electronic document generated, sent and received, together with their associated documents, for a period of five years.

First, the usual misunderstanding

The PDF supports nothing. The regulation says it head-on: for taxpayers, the graphical representation of the document has no tax effect, and its use to support credits or expenses is not permitted. The PDF is a nice printout of the document. The document is the signed XML.

It is the most expensive mistake and the most silent one: the PDFs that arrive by email get filed, the XML attachments get deleted for space, and the day an expense has to be supported there is nothing to do it with.

What exactly has to be kept

  • The XMLs you issued

    All of them, including tickets, credit notes and debit notes.

  • The XMLs you received

    Your suppliers'. These are what hold up your expenses and your input VAT.

  • The tax authority's response messages

    The acceptance is the proof that the document is valid. Without it you have an unconfirmed file.

  • The confirmation messages

    The regulation declares them mandatory for supporting the accounts in the case of electronic issuer-recipients and electronic recipients. What the recipient message is.

  • Voided documents

    Among the duties is keeping the XMLs that support the entries, including those voided or set aside by credit note.

Keeping is not the same as accumulating

The rule does not just ask you to have the files: it asks you to guarantee their unalterability, privacy, legibility, accessibility, preservation, confidentiality, authenticity, integrity and subsequent consultation. A folder on a laptop with no backup does not meet most of that.

A question worth asking your provider. “If I leave tomorrow, do I take all my XMLs with me?” If the answer is not a simple yes, the obligation to keep them for five years is still yours, not theirs. Software that only lets you download PDFs is not letting you comply.

Five years from when

The prudent reading, and the one most people apply, is counting from the close of the fiscal period the document belongs to, not from the invoice date. It is a few months' difference at the edges, and erring on the longer side costs nothing.

If you are a foreign owner

Two practical notes. First, the files have to be reachable from wherever you are — a box of printouts at the property is not compliance. Second, if a local manager or accountant issues on your behalf, the XMLs are still yours to keep: ask for them regularly rather than the day you need them.

From Ticuenta

The XML, with the tax authority's answer, on your own computer

Every document is kept with its signed response, organised by period and by type — and you can take them with you whenever you want.

See how it works

About this article. The five-year period and the conditions of preservation come from article 22 of the Electronic Documents Regulation; the statement that the graphical representation has no tax effect, from the same regulation.

Verified as of 24 September 2026. Tax rules change. This is information, not tax advice.

Sources: Ministry of Finance Current legal texts (Sinalevi)

Also in English