Costa Rica
This page covers the setup and the fields every document shares. Each document type has its own page:
- [CR] Sales Documents: Factura, Tiquete and Exportación
- [CR] Credit and Debit Notes
- [[CR] Purchase Invoices](doc:cr-purchase-invoices)
📮 Postman: every document type has a ready-to-send request in the Invoicing - Costa Rica folder of the Brinta Testing collection.
Available document types
document_type (Brinta) | invoice_type (Brinta) | Hacienda type | Fiscal name | When to use | Page |
|---|---|---|---|---|---|
invoice | debit | 01 | Factura Electrónica | Sale to a buyer identified with a Costa Rican ID | Sales documents |
ticket | debit | 04 | Tiquete Electrónico | Sale to a final consumer | Sales documents |
export | debit | 09 | Factura Electrónica de Exportación | Sale of goods or services to a foreign buyer | Sales documents |
debit note | debit | 02 | Nota de Débito Electrónica | Increase the amount of a document already issued | Credit and debit notes |
credit note | credit | 03 | Nota de Crédito Electrónica | Void, return or discount on an invoice, ticket or export already issued | Credit and debit notes |
purchase invoice | purchase | 08 | Factura Electrónica de Compra | Purchase from a supplier that cannot issue electronic documents | Purchase invoices |
purchase credit note | credit | 03 | Nota de Crédito Electrónica (on a compra) | Void or correct a purchase invoice already issued | Purchase invoices |
Foreign buyers go through
export. Aninvoiceorticketto a foreign buyer is rejected.
Before you start: issuing company setup
The Emisor is filled from the company you send in supplier_company_id. Before the first document, make sure the company has:
- Tax registration with the company's cédula, with no dashes: 10 digits for a cédula jurídica, 9 for a cédula física. Keep only one registration for that number.
- Main business activity with the company's economic activity code, CIIU 4 format
NNNN.N(e.g.7710.1). It is required on every document; without it the document fails.
Fields common to all document types
Root level
supplier_company_id
supplier_company_idUUID of the issuing company in Brinta. See Before you start.
invoice_serie and invoice_number
invoice_serie and invoice_numberThe consecutive number of the document. invoice_serie is the terminal (up to 5 digits) and invoice_number the sequence (up to 10 digits). The sequence is independent per terminal and document type: repeating a number for the same type is rejected.
invoice_date
invoice_dateIssuance date, YYYY-MM-DD. Required. Brinta reports it to Hacienda as that calendar date in Costa Rica time.
invoice_external_id
invoice_external_idYour internal document ID.
currency and exchange_rate
currency and exchange_rateCRCfor documents in colones. Noexchange_rateneeded.- For
USDorEUR, sendexchange_ratein colones per unit of the foreign currency, e.g.505.25.
additional_info
additional_infoFree text. Where it goes depends on the document:
invoice,ticket,exportandpurchase invoice: printed on the document.credit note,debit noteandpurchase credit note: it is the reason for the note reported to Hacienda (3 to 180 characters). If you leave it empty, Brinta sends a standard text for the note'sreason.purchase invoicefrom a Costa Rican supplier: it is also the reason reported for the purchase. If you leave it empty, Brinta sends a standard text.
Payment
Sale condition
| What you send | Reported as |
|---|---|
No invoice_due_date, or the same date as invoice_date | Cash sale (Contado) |
invoice_due_date later than invoice_date | Credit sale, with the days as the term |
For a credit sale you can omit payment_methods[]. A cash sale needs a payment method.
payment_methods[]
payment_methods[]One payment method per document. If you send more than one, only the first is reported.
type | Hacienda meaning |
|---|---|
cash | 01 - Efectivo |
credit card | 02 - Tarjeta |
debit card | 02 - Tarjeta |
bank transfer | 04 - Transferencia |
digital wallet | 07 - Plataforma digital |
other | 99 - Otros. Send its description in name (up to 100 characters) |
buyer
buyer| Field | Meaning |
|---|---|
company.legal_name | Buyer's legal name, up to 100 characters |
company.name | Optional. Trade name, up to 80 characters |
company.tax_registrations[].number | Buyer's ID, no dashes |
company.tax_registrations[].type | Identification type (table below) |
company.email | Buyer's email. The document is sent to this address |
company.address | Optional. See Address |
Identification types
type | Hacienda type | Use it for |
|---|---|---|
CEDULA FISICA | 01 | Individual (9 digits) |
CEDULA JURIDICA | 02 | Company (10 digits) |
DIMEX | 03 | Foreign resident (11 or 12 digits) |
NITE | 04 | NITE holder (10 digits) |
tax_id | 05 | Foreign buyer or supplier (export, purchase invoice) |
NO CONTRIBUYENTE | 06 | Supplier not registered with Hacienda (purchase invoice) |
When the buyer is required depends on the document type. See each document's page.
Address
A Costa Rican address is reported only when it has all four parts. If one is missing, the address is left out of the document.
| Field | Meaning |
|---|---|
state | Province, ISO 3166-2 code, e.g. CR-SJ (San José) |
city | Canton name, e.g. San José |
neighborhood | District, as Hacienda's 2-digit code within the canton, e.g. 01 |
address_line_1 | Address details, at least 5 characters |
A foreign address (export, foreign supplier on a purchase invoice) is reported as free text built from address_line_1, address_line_2, city, state and country, up to 300 characters.
items[]
items[]| Field | Meaning |
|---|---|
name | Product or service name |
description | Optional. Printed after the name in the line detail. Name and description together: up to 200 characters |
quantity | Quantity, up to 3 decimals |
unit_amount | Unit price, before taxes |
discount | Optional. Discount amount on the line (not a percentage) |
amount | quantity × unit_amount - discount, before taxes |
item_external_id | Optional. Your internal product or service code, up to 20 characters. Some CABYS codes require it |
categories[]
categories[]list | code | Required |
|---|---|---|
CABYS | 13 digit CABYS code of the product or service, e.g. 8311100000000 | Always |
unit | Hacienda unit code, e.g. Sp (professional services), Os (other services), Unid, kg | Always |
tariff heading | 12 digit tariff heading, e.g. 080430000019 | export of goods |
Send the unit as Hacienda publishes it (
kg,m2). Brinta adapts the spelling when needed.
taxes[]
taxes[]Send IVA on every line with type: "VAT".
rate | code | Reported as |
|---|---|---|
0.13 | Tarifa general 13% | |
0.04 | Tarifa reducida 4% | |
0.02 | Tarifa reducida 2% | |
0.01 | Tarifa reducida 1% | |
0.005 | Tarifa reducida 0.5% | |
0 | exempt | Exento |
0 | not subject | No sujeto |
0 | No sujeto (no code sent) |
{ "name": "IVA", "type": "VAT", "code": "exempt", "rate": 0, "rate_type": "percentage", "amount": 0, "taxable_amount": 1000 }Totals
You do not need to send totals. Brinta calculates them from items[]: taxed, exempt and non subject amounts split by goods and services, discounts, IVA per rate and total.
Updated 4 days ago
