Skip to content

Electronic invoicing API for Costa Rica

Your system, turned into an e-invoice factory

FACTURATica's electronic invoicing API is a REST web service that connects your POS, ERP, CRM or online store with Costa Rica's Ministry of Finance (Ministerio de Hacienda): issue, check and void electronic documents from any programming language.

LICENSEExclusive to annual ILIMITADO TODO licensesSee the full details on FACTURATica
=BENEFITS()

What your business gains

Benefit 1

Invoice from your own system

Your sales become invoices, electronic tickets (receipts) or export invoices without leaving your POS, your store or your ERP.

Benefit 2

No per-document fee

The API is included in the annual ILIMITADO TODO license: issue as many documents as you need, with no volume cap and no per-call charge.

Benefit 3

Almost your entire dashboard, via API

Since version 2.6.1, the same key lets you work with customers, inventory, price lists, CRM, ERP, accounting, banking, payroll and reports.

Benefit 4

Documented for copy and paste

Each operation comes with its parameters, its response, its cURL command and a tested PHP example, in a gallery of 219 examples.

How the API works

FACTURATica's electronic invoicing API turns your system into an automated factory of electronic documents integrated with Costa Rica's Hacienda. It is a REST web service, exclusive to annual ILIMITADO TODO licenses, that accepts HTTPS POST requests in form-urlencoded format and responds in text or JSON. You don't need your own digital certificate or any special infrastructure.

With it you issue electronic invoices, tickets, export invoices, credit and debit notes and electronic purchase invoices. You can apply VAT rates by code, per-line exemptions, other charges such as the 10% tip, and medication data; check each document's status in real time; download the signed XML, Hacienda's response and the PDF; and void an accepted document, in full or by percentage, in a single call.

Since version 2.6.1, the API goes beyond issuing documents. With the ACTION=UI action and the same key, you operate your dashboard: customers and their tax status, products and inventory, categories and brands, price lists, the CABYS catalog, CRM, ERP and projects, manufacturing, digital accounting, banking, human resources, reports, subscriptions and more. Hacienda's references are up to date with Annexes 4.4 and their April 2026 adjustments.

It works with any language that speaks HTTP: PHP, Python, Node.js, Java, .NET, Go or Ruby, with no proprietary SDK. Issuing has no volume cap; management and dashboard queries allow 60 calls per minute, 600 per hour and 5,000 per day, expandable to match your volume, with ETag caching and pagination in pages of 20 so your server is not overloaded.

Terminal · credentials testREST · any language
curl -sS -X POST "$URL_API" \
  --data-urlencode "ACTION=CLIENTELA" \
  --data-urlencode "CORREO=correo@registrado.com" \
  --data-urlencode "API_KEY=SU_API_KEY_DE_32_CARACTERES" \
  --data-urlencode "SUB=BUSCAR_CLIENTE"
Response{ "result": "success", "ping": true }
=WHO.IS.IT.FOR() · 4 profiles
P1

POS and online store developers

They issue tickets to end consumers without asking for their details, sync stock in batches and get the PDF in the same call.

P2

Companies with their own ERP or CRM

They connect their system to Hacienda's electronic invoicing and keep customers, products and prices in sync with FACTURATica.

P3

High-volume platforms

They issue documents in order and with no volume cap, with an internal queue to handle volume, and can raise query limits if their license calls for it.

P4

Businesses without a tech team

They hire assisted integration: step-by-step support until their system issues its first electronic invoice to Hacienda.

Your first invoice in three steps

=STEPS() → 3
  1. STEP 1Get your API_KEYIn your license's dashboard: Menú, your name, Configuraciones, Otros, API. There you will find the API URL and your 32-character key.
  2. STEP 2Test your credentialsA ping to CLIENTELA writes nothing and responds immediately: if the email and key are correct, it returns ping:true.
  3. STEP 3Issue your first invoiceSend TIMBRAR_FACTURA with the recipient and the line items. With your license active, the quick start takes less than two minutes.
=GUILDS.USING.IT() → 4

Electronic Invoicing API for your guild

See how each guild and sector puts it to work, with its own way of invoicing.

Frequently asked questions about Electronic Invoicing API

=QUESTIONS() → 6
P1

What is FACTURATica's electronic invoicing API?

It is a REST web service that automates issuing, checking and voiding electronic documents with Hacienda in Costa Rica from any system: POS, ERP, CRM or online store. Since version 2.6.1 it also handles customers, inventory, accounting, CRM and almost your entire dashboard.

P2

What do I need to connect?

An annual ILIMITADO TODO license with its API_KEY, and a system capable of making HTTPS POST requests with a form-urlencoded body and reading text or JSON. It does not require your own digital certificate or any special infrastructure.

P3

Which programming languages does it work with?

Any language that speaks HTTP: PHP, Python, Node.js, Java, .NET, Go, Ruby and others. It is standard REST, with no proprietary SDK, and the manual includes a gallery of 219 tested PHP examples, ready to copy.

P4

How much does it cost to use the API?

It is included in the annual ILIMITADO TODO license, at no additional cost per document or per call. If you don't have a tech team, an optional assisted integration service is available for a one-time payment of US$500, with one-on-one support via WhatsApp and guided testing until your first document is issued.

P5

Why does it only work with annual ILIMITADO TODO licenses?

Because of the pricing model: the PREPAGO (prepaid) license is billed per document, and the monthly licenses are for manual use. Only the annual ILIMITADO TODO license allows the continuous, uncapped issuing that automation requires.

P6

How long does Hacienda take to accept a document?

In practice, less than five minutes and sometimes 30 seconds, although Hacienda's official deadline can be as long as 12 hours. The 50-digit key does not confirm acceptance: query ESTADO (the status) until the document shows as accepted.

Your system, turned into an e-invoice factory