Aller au contenu principal

🇨🇷 Costa Rica - E-Invoicing Specifications (Factura Electrónica)

Status: 🟢 Mandatory | Active for all businesses Authority: MH (Ministerio de Hacienda) Platform: MH Electronic Invoice System


1. Context & Overview

Costa Rica has implemented mandatory e-invoicing (factura electrónica) through the Ministry of Hacienda. The system follows a Clearance Model requiring MH pre-authorization before invoice delivery. The rollout has been progressive since 2018.

DateScopeObligation
2018+ProgressiveInitial rollout by sector
OngoingAll businessesContinuous MH authorization
CurrentFull mandatoryAll transaction types

2. Technical Workflow (Clearance Model)

flowchart TD
    S["Invoicerr (Supplier)"] -->|1. Generate XML| X[XML Document]
    X -->|2. Digital Signature| Cert[Digital Certificate]
    Cert -->|3. Submit to MH| MH[Ministerio de Hacienda]
    
    MH -->|4. Validation| V[Schema + Rules Check]
    V -->|5. Authorization| MH
    
    MH -->|6. Return ACK + Number| S
    
    S -->|7. Deliver Invoice| C[Client]
    S -->|8. Store XML| DB[Archive]

🧱 Key Components

  1. Digital Certificate: MH-approved certificates
  2. XML Schema: Hacienda national schema
  3. Sequential Numbering: Mandatory consecutive numbers
  4. Authorization: MH pre-validation

3. Data Standards & Formats

A. Required Format

  • XML Format: MH national schema
  • Encoding: UTF-8
  • Digital Signature: Required

B. Document Types

CodeTypeDescription
01Factura ElectrónicaStandard invoice
02Nota Débito ElectrónicaDebit note
03Nota Crédito ElectrónicaCredit note
04Tiquete ElectrónicoElectronic receipt

C. Critical Data Fields

  • Cédula Jurídica: Business ID (10 digits)
  • Nombre: Legal name
  • Dirección: Address
  • IVA: VAT (13%)
  • Código Moneda: Currency

4. Business Model & Compliance

A. Workflow

  1. Certificate: Obtain MH digital certificate
  2. XML Generation: Create schema-compliant document
  3. Signing: Apply electronic signature
  4. Submission: Send to MH for authorization
  5. Delivery: Send to buyer

B. Archiving

  • Retention: 5 years
  • Format: Original XML

5. Implementation Checklist

  • Cédula Jurídica: Obtain business registration
  • Digital Certificate: Acquire MH certificate
  • XML Engine: Build schema generator
  • Signature Integration: Implement signing
  • MH API: Connect to web services
  • Document Types: Support all types

6. Resources