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.
What your business gains
Invoice from your own system
Your sales become invoices, electronic tickets (receipts) or export invoices without leaving your POS, your store or your ERP.
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.
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.
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.
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"{ "result": "success", "ping": true }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.
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.
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.
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- 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.
- STEP 2Test your credentialsA ping to CLIENTELA writes nothing and responds immediately: if the email and key are correct, it returns ping:true.
- 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.
All 92 API capabilities, one by one
=COUNT(FEATURES) → 92 · 23 groups01Electronic document issuance
13 features
- 1Electronic invoicesIssue invoices from your own system with customer details, multiple lines, tax rates, discounts and credit termsTRUE
- 2Electronic ticketsSell to end consumers from your POS, app or online store without asking for customer detailsTRUE
- 3Export invoicesInvoice customers abroad in dollars, VAT-free and with your customer's international addressTRUE
- 4Credit and debit notesCorrect, refund or add charges to any document, with the reference required by Costa Rica's Ministry of Finance (Ministerio de Hacienda)TRUE
- 5Electronic purchase invoicesBack up your purchases from foreign suppliers or those not required to issue e-invoices, such as Airbnb or AWSTRUE
- 6Other chargesAdd the 10% tip, stamp duties and third-party charges to the document totalTRUE
- 7VAT rates by codeMark lines as exempt or not subject to VAT with Hacienda's exact codeTRUE
- 8Line-level exemptionsApply tax exemptions with their supporting document, institution and exempted rateTRUE
- 9MedicinesInvoice medicines with their health registration number and pharmaceutical formTRUE
- 10VAT refund on health servicesThe VAT refund on medical services paid by card is calculated automaticallyTRUE
- 11Custom text and salespersonAdd the order, the purchase order or the salesperson who served the customer to the documentTRUE
- 12SMS alert to your customerYour customer gets a text message with a link to their document as soon as it is issuedTRUE
- 13Instant PDFGet the PDF in the same call, ready to print or sendTRUE
02Document lookup and management
8 features
- 14Real-time statusKnow whether Hacienda accepted or rejected each document without waiting for the emailTRUE
- 15Signed XML, Hacienda response and PDFDownload the files of any document for your records or your accountingTRUE
- 16Full or partial voidingVoid an accepted document, in full or by percentage, in a single callTRUE
- 17Name lookup by ID number (cédula)Autofill your customer's name or legal business name as you invoiceTRUE
- 18Document search for notesFind the document to correct by sequence number, key, ID number or name, with its line itemsTRUE
- 19Download by keyGet the PDF or XML of any document with nothing but its keyTRUE
- 20Documents as Hacienda sees themCompare what you issued with what Hacienda has on recordTRUE
- 21Sales report with summaryUp to 90 days of sales with totals by type and status, for your dashboardTRUE
03Customers
6 features
- 22Customer list and searchBrowse your entire customer base with search, filters, sorting and paginationTRUE
- 23Complete customer profileAddress, contact details, economic activities, exemption and price lists in a single callTRUE
- 24Add, edit and remove customersKeep your customer base in sync with your CRM, online store or systemTRUE
- 25Document history by customerEverything you have invoiced a customer, with totals and statusTRUE
- 26Tax status with HaciendaCheck a customer's tax regime, status and activities before you invoice themTRUE
- 27Customer autocompleteSearch customers by name as your user typesTRUE
04Products and inventory
7 features
- 28Catalog with imagesYour inventory with price, VAT, stock, categories, brand and images for your online storeTRUE
- 29Product details with costA product's price, cost and stock, by codeTRUE
- 30Stock for 20 products per callSync your store's stock in batches, without one call per productTRUE
- 31Duplicate-proof stock adjustmentsDeduct what was sold only once, even if your system retries the orderTRUE
- 32Add, edit and remove productsManage your inventory from your own system, with CABYS, price, cost and VATTRUE
- 33Quick price or stock updateUpdate a single product field without touching anything elseTRUE
- 34Bulk CABYS assignmentAssign the same CABYS code to many products at onceTRUE
05Categories and brands
3 features
- 35Hierarchical categoriesOrganize your catalog into categories and subcategoriesTRUE
- 36BrandsCreate and manage your product brandsTRUE
- 37Bulk enable or disableTurn all your categories or brands on or off at onceTRUE
06Price lists
4 features
- 38Manual and percentage-based listsSpecial prices per list: fixed per product or a percentage of the base priceTRUE
- 39Products per listAdd, change or remove products in each listTRUE
- 40Effective price by list and currencyCalculate a product's final price in any list, in colones or dollarsTRUE
- 41Default lists by document typeKnow which list applies at the point of sale, on the invoice or on the ticketTRUE
07CABYS
1 features
- 42CABYS catalog searchFind the right code by number or by keyword, with or without accentsTRUE
08Suppliers
1 features
- 43SuppliersLook up, add and search your suppliersTRUE
09CRM
7 features
- 44Customer timelineDocuments, payments, appointments, interactions and opportunities in a single threadTRUE
- 45InteractionsLog calls, notes and meetings from your phone system or your appTRUE
- 46Sales pipeline and opportunitiesMove your opportunities through the pipeline stages with their value and probabilityTRUE
- 47Customer tagsSegment your customer base, even many customers at onceTRUE
- 48Follow-ups and remindersSchedule, postpone and complete follow-up tasks by priorityTRUE
- 49Customer pulseA score from 0 to 100 that tells you which customers to look after firstTRUE
- 50AppointmentsBook appointments in your calendar from your booking siteTRUE
10ERP and projects
2 features
- 51Projects with income statementsEach project's revenue, expenses, profit and margin, always up to dateTRUE
- 52Create and edit projectsCreate projects with customer, budget and dates, and track their statusTRUE
11Manufacturing
4 features
- 53Raw materialsYour raw materials warehouse with stock and costTRUE
- 54Inventory movementsRaw material receipts and issues recorded from your own systemTRUE
- 55RecipesWhat goes into each finished product, for costing and productionTRUE
- 56Production ordersProduce with an estimated cost and automatic deduction of raw materialsTRUE
12Digital accounting
7 features
- 57IFRS accounting policiesDraft your accounting policies from just a few answersTRUE
- 58Period-end closeReview the closing accounts, simulate the close and check your closing historyTRUE
- 59Fixed assets and depreciationRegister assets and get their month-by-month depreciation scheduleTRUE
- 60Recurring journal entriesSchedule the entries that repeat every monthTRUE
- 61Chart of accountsBrowse your chart of accounts and add sub-accountsTRUE
- 62Journal entries, receivables and payablesBrowse the journal, the credit you have extended to customers and what you oweTRUE
- 63LoansCheck your personal, mortgage, pledge-secured and commercial loansTRUE
13Banks
2 features
- 64Bank accounts with balancesThe book balance of each bank account, with its account number and IBANTRUE
- 65Bank reconciliationPrepare, close, review and undo reconciliations of your accountsTRUE
14Human resources
4 features
- 66Calculated payrollEach period's payroll with benefits, deductions and total payableTRUE
- 67Social security contributionsWhat the employer and the employee pay on each salary, plus the payroll totalTRUE
- 68Pay stubsIssue your payroll pay stubs in a single callTRUE
- 69Payrolls, employees, overtime and bonusesManage your payroll from your time-and-attendance or HR systemTRUE
15Reports
5 features
- 70Purchases and accounts payableYour purchases for the period and what you owe suppliersTRUE
- 71Monthly balanceSales minus purchases for each month, plus the data to chart itTRUE
- 72Sales by customer and best sellersWhat each customer buys and what sells the mostTRUE
- 73D-103 draftThe boxes of your salary withholding tax returnTRUE
- 74Calendar activityYour sales and purchases, day by dayTRUE
16Management indicators
1 features
- 75166 management indicatorsThe complete catalog of business questions your FACTURATica answersTRUE
17Incoming purchases
2 features
- 76Purchase inboxHow many purchases are awaiting review and which ones arrived most recentlyTRUE
- 77Purchase previewThe details of a received purchase before you accept itTRUE
18Subscriptions
4 features
- 78Create subscriptionsSet up recurring charges with their frequency, line items and number of repetitionsTRUE
- 79Pause, resume and cancelControl each subscription from your own system or your customer portalTRUE
- 80Subscription historyThe documents each subscription has issuedTRUE
- 81Issue nowIssue a subscription's document without waiting for its scheduled dateTRUE
19Layaways
1 features
- 82LayawaysCreate layaways, look them up and get their contract ready to printTRUE
20Templates and pro forma invoices
1 features
- 83Templates and pro forma invoicesReuse your frequent pro forma invoices and mark your favoritesTRUE
21SMS
1 features
- 84SMS conversationsYour customers' replies and the full thread with each numberTRUE
22Settings and exchange rate
3 features
- 85Saved remarks and documentsUse the texts already saved in your dashboard directly from your own systemTRUE
- 86Banners and watermarkKnow which images appear on your documentsTRUE
- 87Today's exchange rateThe same exchange rate FACTURATica uses when invoicing in dollarsTRUE
23Capacity and scalability
5 features
- 88No cap on issuance volumeIssue as many documents as you need, one after anotherTRUE
- 89Generous limits for management calls60 requests per minute, 600 per hour and 5,000 per day for management and dashboard callsTRUE
- 90Expandable limitsIf your volume calls for it, the limits are raised for your licenseTRUE
- 91ETag cachingAsk whether something has changed and get a 304 without downloading the data againTRUE
- 92PaginationPage through large lists 20 at a time without overloading your serverTRUE
Catalog sourced from the official page for Electronic Invoicing API on FACTURATica.
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() → 6P1What 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.
P2What 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.
P3Which 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.
P4How 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.
P5Why 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.
P6How 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