☰
Your One-Stop for Accounting, Taxes and Business in Costa Rica
  • Home
  • What we do
  • Services
    • Bookkeeping Services
    • Accounting Services
    • Taxes in Costa Rica
    • Payroll
    • Property Taxes
    • Registrations and Incorporations
    • Collections Services
    • Payables Services
    • US Taxes
    • Legal Services
    • Insurance in Costa Rica
    • Banking In Costa Rica
  • Blog
  • Links
  • Contact

Electronic Invoicing in Costa Rica: How It Works

October 29th, 2026 | Posted by: Randall Zamora Hidalgo | No Comments

Electronic Invoicing in Costa Rica: How It Works

Key takeaways

  • Every business registered with Costa Rica's tax authority must issue electronic invoices (facturas electronicas) as signed XML files, not PDFs or paper.
  • You need a cryptographic key from the TRIBU-CR portal and a digital certificate before you can legally issue a single invoice.
  • Each XML document carries a 50-digit numeric key, CAByS product codes, the current activity codes, and a digital signature, then goes to Hacienda in real time.
  • Failing to issue an invoice can cost two base salaries per violation, and repeat offenders face a five-day closure of their business.
  • The format standard has moved to version 4.4, so your invoicing software and accounting records need to stay current with the active specification.

Electronic invoicing in Costa Rica means issuing every sales document as a digitally signed XML file that the tax authority, Hacienda, validates in real time. If you run a business here, paper and PDF invoices no longer count as legal records on their own, and you cannot issue a single valid invoice until you register for a cryptographic key and a digital certificate first.

This guide walks through what the system requires, how to get authorized, the fields your documents must carry, how invoicing connects to your accounting, and what non-compliance actually costs. The rules apply the same way to a local shop and to a foreign-owned company, because the obligation follows your tax registration rather than your ownership.

Accountant reviewing financial documents with a calculator and laptop on an office desk

What Electronic Invoicing in Costa Rica Requires

The core requirement is simple to state and strict in practice: each commercial document must be a structured XML file, signed with a valid digital certificate, and sent to Hacienda for validation. The printed or emailed version your customer reads is only a representation. The signed XML is the legal invoice.

That single rule carries several obligations with it. Every taxpayer registered with Hacienda falls under the mandate, and the obligation applies from the date you registered. You need software capable of generating the XML in the official structure, signing it, transmitting it, and storing the response. You also keep each file for five years. The stored XML, not a printout, is the record a tax auditor will ask for.

Costa Rica has run mandatory electronic invoicing for several years, and the technical standard keeps evolving. The format has advanced to version 4.4 of the electronic receipts specification, which refined the XML schema and tightened the data each document must report. Treat the version number as a moving target and confirm the active one with Hacienda before you configure anything.

How Do You Get Authorized by the Tax Authority?

Authorization happens through Hacienda's taxpayer portal, now operating as TRIBU-CR, and it must be finished before you issue your first invoice. You register as a taxpayer, declare your economic activities, and generate a cryptographic key, the "llave criptografica," that your software uses to sign and submit each document.

The sequence matters. First, confirm your tax registration and activity codes are current in the portal. Second, obtain a digital certificate; the signature on your invoices has to trace back to a recognized certification authority. Third, generate the cryptographic key inside TRIBU-CR and load it into your invoicing software. Only then can you transmit a document and receive a valid acceptance from Hacienda.

Foreign founders often underestimate this step because it has to line up with company registration and tax enrollment in the right order. Getting the activity codes and certificate wrong at the start means every invoice you issue afterward inherits the error. The registration milestones that precede invoicing need to be in place before you reach the portal.

You can confirm the current portal procedures and resolutions on the official Ministerio de Hacienda website, which publishes the governing rules directly.

Required Fields and the XML Format

A valid electronic invoice is a specific XML structure, and missing or malformed fields cause Hacienda to reject it. At the center sits a 50-digit numeric key, the "clave numerica," that uniquely identifies the document. Without a correctly built key, the file is not a document Hacienda will accept.

Beyond the key, each document carries the issuer and recipient tax IDs, the digital signature, and classification codes for what you sold. Product and service lines must include CAByS codes, the national catalog classification that has been mandatory for years. Documents also report activity codes drawn from the current economic activity standard, which the recent format updates aligned to a newer version.

Here is a practical field checklist for each document:

  • The 50-digit numeric key (clave numerica)
  • Issuer and recipient identification (cedula or tax ID)
  • A valid digital signature tied to a recognized certificate
  • CAByS classification code for every line item
  • The applicable economic activity code
  • Tax detail, including VAT where it applies

Business professional signing a document with a pen on a wooden desk

Because several lines on the invoice drive tax calculations, the classification work is not cosmetic. The VAT treatment of a line depends on its code, so an error there is both a format problem and a tax problem. If VAT handling is new to you, our explainer on how VAT (IVA) works in Costa Rica shows how the rates map onto your invoice lines.

Integrating Invoicing Software With Your Accounting

The invoice is only useful if the data flows into your books without re-keying. A good setup generates the XML, captures Hacienda's acceptance response, and posts the transaction to your accounting ledger from the same record, so revenue, VAT, and receivables all reconcile against the documents the tax authority already validated.

Two points decide whether this works. The first is the response message. When you transmit an XML, Hacienda returns an acceptance or a rejection, and only an accepted document is valid. Your workflow has to wait for that confirmation rather than assume the invoice went through. The second is the acknowledgment flow on documents you receive: as a buyer, you confirm supplier invoices, and those confirmations belong in your records too.

Many businesses bring in an accountant here rather than wiring the systems together alone. At Costaricaabc, we connect clients' invoicing output to their monthly bookkeeping so the XML files, the VAT returns, and the income tax filings all tell the same story. If you want to see how that engagement runs in practice, our overview of accounting services in Costa Rica describes what the monthly cycle looks like. The payoff is a clean audit trail: every peso of reported revenue ties back to an accepted document with a verifiable numeric key.

What Are the Penalties for Non-Compliance?

Non-compliance is expensive, and the fines are tied to the "salario base," a reference figure that is updated each year. Failing to issue or deliver an electronic invoice can be sanctioned at two base salaries per violation, which translates into a sum well into the hundreds of thousands of colones per infraction under the tax procedures code.

The exposure climbs from there. Not transmitting the required XML to Hacienda is penalized as a percentage of gross income, subject to a minimum measured in base salaries, which can dwarf the per-invoice fine for a larger business. For taxpayers who keep offending after a final sanction, the law allows closure of the establishment for several days, a penalty that stops revenue entirely while the doors stay shut.

Those three tiers, a per-document fine, a percentage-of-income penalty, and temporary closure, are why compliance is not something to defer. The cost of a correct setup is small next to a single enforcement action, and the records that protect you are the same accepted XML files you were already required to keep.

Getting Your Invoicing Right From Day One

Start by confirming three things in order: your tax registration and activity codes are current, your digital certificate is valid, and your cryptographic key is generated and loaded into software that produces the current XML version. Issue a test document, confirm Hacienda accepts it, and only then run live invoices through the same path into your accounting. If any of those steps feel uncertain, have an accountant set up the chain once rather than discovering a format error across months of invoices during an audit. Reach out to Costaricaabc to get your invoicing and bookkeeping configured together from the first document.

Frequently asked questions

Do foreign-owned companies in Costa Rica have to issue electronic invoices?

Yes. Any company or individual registered as a taxpayer with Hacienda must issue electronic invoices, regardless of who owns it. The rule follows tax registration, not nationality.

Can I just send a PDF invoice to my client?

No. A valid electronic invoice is a digitally signed XML file accepted by Hacienda. A PDF or printed representation can accompany it for readability, but the XML is the legal document.

What happens if Hacienda rejects my XML?

A rejected document is not valid. You must correct the errors flagged in the response message and resubmit until Hacienda returns an acceptance, otherwise the sale has no legal invoice.

How long do I have to keep electronic invoices?

You must archive the XML files for five years. The stored file is the original record, so keeping only a PDF copy does not satisfy the requirement.

Which format version should my software use?

Costa Rica has moved to version 4.4 of the electronic receipts standard. Confirm the active version directly with Hacienda, since the technical specification is updated periodically.

Leave a Comment Cancel reply

Your email address will not be published. Required fields are marked *

    • Whether you are starting your business from scratch in Costa Rica, or want to streamline your existing business, Randall Zamora and his team at Costa Rica ABC will help simplify everything for you. They will navigate you through the many regulations that must be met to get your business started, and once you are up and running, their monthly accounting and bill-pay services ensure that you can have more of your time devoted to developing and growing your business.  I highly recommended them!

      Michael Evans StoneMountainOutdoors.com
    • Randall Zamora and his team at Costa Rica ABC have been doing my personal and my Costa Rica Corporate accounting and tax filing for over 9 years. I went through several typical Accounting firms before finding them. I am convinced they apply their intimate understanding of the Costa Rica tax laws to minimize my Costa Rica taxes.

      Many of my tour guests go on to form Costa Rica Corporations and utilize their services to simplify the complex transition of funds and comply with the USA filing requirements.

      George Lundquist www.CostaRicaRetireOnSS.com
    • We have had Randall Zamora and his team on retainer for more than 10 years and I have no plans to change that. He is a one stop shop for day to day questions and as well as managing complex compliance strategies.

      Zach Smith www.AnywhereCostaRica.com
       
  • Join Our Mailing List

    [contact-form-7 id="191" title="Contact form 1"]
  • Blog Archives

    • November 2026
    • October 2026
    • June 2019
    • August 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • October 2013
    • August 2013
    • May 2013
  • © Copyright 2026 CostaRicaABC.com - Plaza Comercial Vereda Real, Second Floor, Suite 10
  • Phone: +50622445433 | Email: info@costaricaabc.com
  • Facebook Twitter Google