What is an electronic tax document?
An electronic tax document (comprobante electrónico) in Costa Rica is a digital document (signed XML) that:
- Represents a business transaction (sale, return, adjustment).
- Is validated by Hacienda (Costa Rica’s tax authority).
- Has tax and legal value equivalent to a printed document.
- Follows the official v4.4 schema (in effect since 2023-06).
Why this matters for your integration
- You cannot make up numbers — the key and the consecutive number follow strict rules.
- The XML must be signed with the issuer’s valid P12 certificate.
- Hacienda validates structure, amounts, totals, VAT, and the recipient’s identification.
- A rejected document has no tax value — it must be corrected and reissued.
Minimum components of a document
| Component | Who provides it |
|---|---|
| Issuer (tenant data) | Configured in LX CloudPos |
| Recipient (customer) | Sent by you (cliente.idCliente or full detail) |
| Detail (line items) | Sent by you (lineas[]) |
| Summary (totals, taxes) | Calculated by LX CloudPos |
| Key | Generated by LX CloudPos |
| Consecutive number | Incremented by LX CloudPos |
| XAdES signature | Applied by LX CloudPos |
| Hacienda confirmation | Issued by Hacienda |