Invosphere
Create invoice

Costa Rica Factura Electrónica: Hacienda XML, Clave Numérica and Acceptance Messages (2026)

Costa Rica factura electrónica guide from Invosphere, 2026

By Muhammad Wasim, founder of ToolSphare · Updated 2026-11-28 · ~7 min read

Costa Rica factura electrónica means a signed XML comprobante sent to the Ministerio de Hacienda for validation, identified by a 50-digit clave numérica and a 20-digit consecutive number, and answered by Hacienda with an acceptance or rejection message. The receiver of a business invoice also sends its own response, the mensaje receptor, to accept, partially accept or reject it. Since 1 September 2025 version 4.4 of the electronic-document structure has been mandatory, and since 6 October 2025 Hacienda’s taxpayer services run on the new TRIBU-CR platform, which replaced ATV. This guide explains the documents, the identifiers, the acceptance flow and what version 4.4 changed for everyday invoices. It is general information, not tax advice; confirm current resolutions with the Dirección General de Tributación (DGT).

Costa Rica factura electrónica guide from Invosphere, 2026
Costa Rica electronic invoices are Hacienda XML files with a 50-digit clave and buyer acceptance messages.

Free E-Invoice Generator: prepare the invoice details and a readable PDF copy before you send the structured e-invoice through your approved system. No sign-up.

Open the e-invoice generator

The electronic documents Costa Rica uses

Costa Rica has a family of comprobantes electrónicos rather than a single invoice type. Each must be generated in the official XML structure, signed and sent to Hacienda, which replies with a validation message. The PDF that the customer reads is a representation of the XML.

  • Factura electrónica for sales to identified buyers, usually businesses that need the document for VAT credit and expenses.
  • Tiquete electrónico for sales to final consumers who do not need a business invoice.
  • Nota de crédito and nota de débito electrónica to correct or adjust an earlier comprobante.
  • Factura electrónica de compra, issued by the buyer in listed cases, including, under version 4.4, purchases of services or intangibles from non-domiciled suppliers together with the VAT on that import.
  • Factura electrónica de exportación for exports.
  • Recibo electrónico de pago (REP), new in version 4.4, which supports collection of a credit sale when the rules allow VAT to be declared on payment, for example certain sales to the State and credit sales up to 90 days.

Every line on a factura must carry a CABYS code, Costa Rica’s catalogue of goods and services, which also drives the VAT rate. Wrong or outdated CABYS codes are the most common cause of rejections. Treat CABYS as part of your item master, the way you would treat a HS code on an export.

Clave numérica, consecutive numbers and the mensaje receptor

Each comprobante has a 50-digit clave numérica that encodes the country code, date, issuer identification, the consecutive number, a situation code (normal, contingency or no internet) and a security code. The 20-digit consecutive number itself encodes the branch, terminal, document type and sequence. Software generates both; staff should never type them.

After Hacienda validates a factura, the receiver can respond with a mensaje receptor: acceptance, partial acceptance or rejection. That response affects the buyer’s ability to use the document and gives the seller an early warning of disputes. If you are the seller, track rejections as you would an invoice dispute: someone should own the reply and any corrective credit note.

Draft the commercial invoice in colones or dollars, with VAT by rate and clear payment terms, before your v4.4 system signs and sends it.

Open the free invoice generator

What version 4.4 changed, and the move to TRIBU-CR

Resolution MH-DGT-RES-0027-2024, published on 19 November 2024, introduced version 4.4 with 146 changes to the structure. After a postponement announced in February 2025, it became mandatory on 1 September 2025. Version 4.3 remained usable only for credit or debit notes correcting documents issued under 4.3. The changes most visible to invoice teams are:

  • Payment-method codes for SINPE Móvil and other digital platforms, with a breakdown when a sale is paid by more than one method.
  • Discount codes by type (promotional, volume, seasonal, commercial and others) rather than a single discount amount.
  • Bundles and combos broken down into their component items.
  • Structured issuer location and stronger receiver data, including a category for non-domiciled foreign buyers.
  • VAT-rate codes, including a code for a 0% rate without right to credit, which is not the same as exempt.
  • A system-provider field identifying the invoicing software provider, who must be registered with Hacienda.
  • CABYS on credit and debit notes that correct documents with CABYS lines.

On 6 October 2025 TRIBU-CR replaced ATV as Hacienda’s taxpayer platform, with economic activities classified under CIIU 4 and a free official issuer, TicoFactura, for smaller taxpayers. TRIBU-CR compares invoices with returns, so a document that was accepted but carries a wrong rate or activity code still creates a discrepancy. Review activity codes in your software after any change in TRIBU-CR.

Dates and features above follow Resolution MH-DGT-RES-0027-2024 and public professional summaries available in 2026. They are not a complete or official statement. Confirm current requirements on hacienda.go.cr or with a Costa Rican adviser before you change a billing process.

Checklist for issuers, buyers and foreign suppliers

Most Costa Rican rejections and disputes trace back to a handful of controls. Running through them before each billing cycle, and after every Hacienda change, saves far more time than reissuing documents later.

  • Confirm your software issues version 4.4 and that the system-provider field shows a provider registered with Hacienda. A home-built tool without registration will cause trouble with that field.
  • Audit CABYS codes on every active item and service, and re-check them when CABYS is updated. A wrong code can mean a wrong VAT rate, even on an accepted document.
  • Check your activity code in TRIBU-CR after the CIIU 4 migration, and make sure invoices use the current code.
  • Capture receiver identification and email on the customer record, including the non-domiciled category for foreign buyers.
  • Handle mensaje receptor rejections within a set number of days, with a named owner, and issue a credit note referencing the clave numérica where needed.
  • Use the REP for collections on qualifying credit sales, so VAT declared on payment is supported.
  • Archive the signed XML and Hacienda’s responses, not just the PDF, for the official retention period; see electronic invoice archiving.

Foreign suppliers that sell services to Costa Rican businesses without a local establishment usually do not issue Costa Rican comprobantes. Under version 4.4, the local buyer supports the purchase with a factura electrónica de compra and handles the import VAT. That means your ordinary commercial invoice still matters: it is the document the buyer uses to build its own comprobante, so it must show a clear description, period, currency and amount.

Worked example: a factura with SINPE Móvil and a discount

A San José marketing studio bills a registered retailer for a campaign. It applies a commercial discount, coded as such under 4.4, and the retailer pays part by bank transfer and part by SINPE Móvil. The studio’s system reports both payment methods. The general VAT rate in Costa Rica is 13%; reduced rates apply to listed goods and services through CABYS.

Example only — figures and identifiers are illustrative

Estudio Pacífico S.A.

Cédula jurídica 3-101-XXXXXX

Activity code as registered in TRIBU-CR

INVOICE

Consecutivo 00100001010000003291

Bill to

Tiendas Valle Central S.A.

Cédula jurídica 3-101-YYYYYY

Invoice date

16 November 2026

Due date

16 December 2026

DescriptionQtyRateAmount
Campaign design and production, Q4 retail campaign (CABYS on line)1₡2,800,000₡2,800,000
Commercial discount (discount type: commercial)1-₡140,000-₡140,000
Taxable base₡2,660,000
IVA 13%₡345,800
Total due₡3,005,800

Payment methods: transfer ₡2,500,000; SINPE Móvil ₡505,800

Clave numérica printed with the PDF

A version 4.4 factura codes the discount type and reports each payment method used.

If the retailer had bought on credit under a regime that lets VAT be declared on collection, the studio would issue a REP when payment arrives. If a line is later disputed, the studio issues a credit note referencing the original clave numérica, never an edited PDF. See credit notes and correcting an invoice after sending.

Costa Rica factura electrónica FAQ

Is version 4.4 mandatory?

Yes. Version 4.4 has been mandatory since 1 September 2025. Version 4.3 can only be used for notes that correct documents issued under 4.3.

What is the mensaje receptor?

It is the receiver’s response to a validated comprobante: acceptance, partial acceptance or rejection. It gives the seller early notice of a problem.

What is CABYS?

CABYS is Costa Rica’s catalogue of goods and services. Each invoice line needs a valid code, which also links to the VAT rate.

What replaced ATV?

TRIBU-CR replaced ATV as Hacienda’s taxpayer platform on 6 October 2025, with the free TicoFactura issuer for smaller taxpayers.

Do I need a factura de compra for foreign software subscriptions?

Under version 4.4, purchases of services or intangibles from non-domiciled suppliers are supported with a factura electrónica de compra that includes the import VAT. Confirm your case with an adviser.

Draft a clear commercial invoice in minutes

Draft quotes and commercial invoices, then issue the Hacienda comprobante. No sign-up.

  • 134 invoice and document types
  • 16 country tax presets
  • 35 languages
Open the free e-invoice generatorBrowse invoice templates
Muhammad Wasim, software engineer and founder of ToolSphare, builds Invosphere’s invoice generator and invoicing software. He writes practical billing guides for small businesses in 16 countries. About Invosphere · Contact
This guide is general information, not legal or tax advice.

Create your invoice in minutes

Open the free Invosphere invoice generator, pick from 134 invoice types and download a PDF. No sign-up needed.