Costa Rica

This page covers the setup and the fields every document shares. Each document type has its own page:

📮 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 typeFiscal nameWhen to usePage
invoicedebit01Factura ElectrónicaSale to a buyer identified with a Costa Rican IDSales documents
ticketdebit04Tiquete ElectrónicoSale to a final consumerSales documents
exportdebit09Factura Electrónica de ExportaciónSale of goods or services to a foreign buyerSales documents
debit notedebit02Nota de Débito ElectrónicaIncrease the amount of a document already issuedCredit and debit notes
credit notecredit03Nota de Crédito ElectrónicaVoid, return or discount on an invoice, ticket or export already issuedCredit and debit notes
purchase invoicepurchase08Factura Electrónica de CompraPurchase from a supplier that cannot issue electronic documentsPurchase invoices
purchase credit notecredit03Nota de Crédito Electrónica (on a compra)Void or correct a purchase invoice already issuedPurchase invoices

Foreign buyers go through export. An invoice or ticket to 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

UUID of the issuing company in Brinta. See Before you start.

invoice_serie and invoice_number

The 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

Issuance date, YYYY-MM-DD. Required. Brinta reports it to Hacienda as that calendar date in Costa Rica time.

invoice_external_id

Your internal document ID.

currency and exchange_rate

  • CRC for documents in colones. No exchange_rate needed.
  • For USD or EUR, send exchange_rate in colones per unit of the foreign currency, e.g. 505.25.

additional_info

Free text. Where it goes depends on the document:

  • invoice, ticket, export and purchase invoice: printed on the document.
  • credit note, debit note and purchase 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's reason.
  • purchase invoice from 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 sendReported as
No invoice_due_date, or the same date as invoice_dateCash sale (Contado)
invoice_due_date later than invoice_dateCredit 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[]

One payment method per document. If you send more than one, only the first is reported.

typeHacienda meaning
cash01 - Efectivo
credit card02 - Tarjeta
debit card02 - Tarjeta
bank transfer04 - Transferencia
digital wallet07 - Plataforma digital
other99 - Otros. Send its description in name (up to 100 characters)

buyer

FieldMeaning
company.legal_nameBuyer's legal name, up to 100 characters
company.nameOptional. Trade name, up to 80 characters
company.tax_registrations[].numberBuyer's ID, no dashes
company.tax_registrations[].typeIdentification type (table below)
company.emailBuyer's email. The document is sent to this address
company.addressOptional. See Address

Identification types

typeHacienda typeUse it for
CEDULA FISICA01Individual (9 digits)
CEDULA JURIDICA02Company (10 digits)
DIMEX03Foreign resident (11 or 12 digits)
NITE04NITE holder (10 digits)
tax_id05Foreign buyer or supplier (export, purchase invoice)
NO CONTRIBUYENTE06Supplier 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.

FieldMeaning
stateProvince, ISO 3166-2 code, e.g. CR-SJ (San José)
cityCanton name, e.g. San José
neighborhoodDistrict, as Hacienda's 2-digit code within the canton, e.g. 01
address_line_1Address 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[]

FieldMeaning
nameProduct or service name
descriptionOptional. Printed after the name in the line detail. Name and description together: up to 200 characters
quantityQuantity, up to 3 decimals
unit_amountUnit price, before taxes
discountOptional. Discount amount on the line (not a percentage)
amountquantity × unit_amount - discount, before taxes
item_external_idOptional. Your internal product or service code, up to 20 characters. Some CABYS codes require it

categories[]

listcodeRequired
CABYS13 digit CABYS code of the product or service, e.g. 8311100000000Always
unitHacienda unit code, e.g. Sp (professional services), Os (other services), Unid, kgAlways
tariff heading12 digit tariff heading, e.g. 080430000019export of goods

Send the unit as Hacienda publishes it (kg, m2). Brinta adapts the spelling when needed.

taxes[]

Send IVA on every line with type: "VAT".

ratecodeReported as
0.13Tarifa general 13%
0.04Tarifa reducida 4%
0.02Tarifa reducida 2%
0.01Tarifa reducida 1%
0.005Tarifa reducida 0.5%
0exemptExento
0not subjectNo sujeto
0No 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.


Did this page help you?