Costa Rica e-invoicing, in a single API call.
The same engine that issues every Astra document. FE 4.4, all 7 types, webhooks, PDF and a 5-year fiscal archive.
{ "document": { "document_type": "01", "branch": "001" }, "commercial_info": { "currency": "CRC", "payment_method": "06" }, "issuer": { "type": "02", "id": "3101654321", "name": "Ferretería La Sabana S.A." }, "receiver": { "type": "01", "id": "109870654", "name": "Laura Jiménez Mora", "email": "laura.jimenez@example.com" }, "items": [{ "cabys_code": "4423201000100", "description": "Taladro percutor 750 W", "quantity": 1, "unit": "Unid", "price": 42500, "tax": { "type": "01", "rate_code": "08", "rate": 13 } }], "delivery": { "email": true }}
{ "success": true, "data": { "document_key": "50608102600310165432100100001010000001042147201936", "consecutive_number": "00100001010000001042", "document_type": "01", "status": "processing", "environment": "staging" }}
- FE 4.4 validation · 5 phases0.4 ms
- XML built71 µs
- Signed XAdES-EPES6 ms
- Sent to Hacienda412 ms
1<?xml version="1.0" encoding="UTF-8"?>2<FacturaElectronica xmlns="https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.4/facturaElectronica">3 <Clave>50608102600310165432100100001010000001042147201936</Clave>4 <ProveedorSistemas>3101000000</ProveedorSistemas>5 <CodigoActividadEmisor>475201</CodigoActividadEmisor>6 <NumeroConsecutivo>00100001010000001042</NumeroConsecutivo>7 <FechaEmision>2026-10-08T10:42:07-06:00</FechaEmision>8 <Emisor>9 <Nombre>Ferretería La Sabana S.A.</Nombre>10 <Identificacion><Tipo>02</Tipo><Numero>3101654321</Numero></Identificacion>11 </Emisor>12 <DetalleServicio>13 <LineaDetalle>14 <NumeroLinea>1</NumeroLinea>15 <CodigoCABYS>4423201000100</CodigoCABYS>16 <Cantidad>1</Cantidad>17 <UnidadMedida>Unid</UnidadMedida>18 <Detalle>Taladro percutor 750 W</Detalle>19 <PrecioUnitario>42500.00000</PrecioUnitario>20 <BaseImponible>42500.00000</BaseImponible>21 <Impuesto><Codigo>01</Codigo><CodigoTarifaIVA>08</CodigoTarifaIVA><Tarifa>13</Tarifa><Monto>5525.00000</Monto></Impuesto>22 <MontoTotalLinea>48025.00000</MontoTotalLinea>23 </LineaDetalle>24 </DetalleServicio>25 <ResumenFactura>26 <MedioPago><TipoMedioPago>06</TipoMedioPago></MedioPago>27 <TotalImpuesto>5525.00000</TotalImpuesto>28 <TotalComprobante>48025.00000</TotalComprobante>29 </ResumenFactura>30 <ds:Signature Id="id-7f3c1e2a" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">31 <ds:SignedInfo>32 <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>33 <ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>34 </ds:SignedInfo>35 <ds:SignatureValue>kQ3v9yT0b1m…Xr8=</ds:SignatureValue>36 <ds:Object>37 <xades:QualifyingProperties Target="#id-7f3c1e2a">38 <xades:SignedProperties Id="xades-id-7f3c1e2a">39 <xades:SigningTime>2026-10-08T10:42:07-06:00</xades:SigningTime>40 <xades:SignaturePolicyIdentifier>…</xades:SignaturePolicyIdentifier>41 </xades:SignedProperties>42 </xades:QualifyingProperties>43 </ds:Object>44 </ds:Signature>45</FacturaElectronica>
- Received · POST /electronic-documents · 20110:42:07.112
- Signed · XAdES-EPES · 6 ms10:42:07.118
- Sent to Hacienda · reception 20210:42:07.540
- Hacienda verdict · aceptado · callback10:42:09.874
- Webhook delivered · document.accepted · 200 OK · 84 ms10:42:09.958
- Email sent · XML + PDF to laura.jimenez@example.com10:42:10.402
All seven document types of version 4.4, plus receptor messages.
Issue documents without fighting the XML
You send JSON; Aster validates, builds, signs and submits. The 4.4 rules are checked before signing, so Hacienda rejections stay in your tests instead of reaching your customers.
Your first invoice in minutes. A test key, one POST and a verdict from Hacienda staging or the simulated sandbox.
$ curl $ASTER_API/electronic-documents \-H "Authorization: Bearer $ASTER_KEY" \-H "X-Idempotency-Key: pedido-1042" \-d @factura.json201 processing · 50608102600310…✓ accepted in 2.3 s$Hacienda errors, caught before sending. Totals, CABYS, note references and tax rates are validated in five phases. You get the exact field and the code Hacienda would have returned.
POSpos-caja-02 sent POST /electronic-documents···Credit note 0000000087 referencing invoice 0000001042validation · 5 phases · 0.4 ms422Aster replied 422 validation_error···items[1].cabys_code — CABYS 4292199990200 is not in the referenced document. -509
totals.total — The note (₡61,020.00) exceeds the invoice total (₡48,025.00). -512
All 7 document types. Invoice, ticket, credit and debit notes, purchase, export and electronic payment receipt.
Catalogs included. CABYS, tariff codes, provinces down to neighborhoods and taxpayers, on public endpoints.
BCCR and per-bank exchange rates. With history back to 2012 for invoicing in dollars.
Under half a second from your system to Hacienda
A 0.46 s median on real production traffic, from the moment your request arrives until the document is validated, signed, stored and queued for Hacienda. Measured over the last 30 days on about 1,000 real documents.
Measured in production, not in a lab. Half of all documents are out in under 0.46 s, 90% in under 0.66 s and 95% in under 0.74 s. Receptor messages take 0.45 s.
In that time we check everything Hacienda rejects: the 5 validation phases, the CABYS code and IVA rate on every line, the totals, the receiver’s ID against Hacienda’s registry and its economic activity. If something is wrong, we answer with the exact field before Hacienda ever sees the document, with no round trips over a typo.
Every verdict, without having to ask
Signed webhooks, retries and a queue that never drops a document. If Hacienda is not answering, Aster keeps the document and resends it when Hacienda is back.
Hacienda outages are not your problem. Documents wait in a queue and are resent automatically, with no retry limit. You get
document.queued, then the verdict.Webhooks signed with HMAC-SHA256. Accepted, rejected or queued: every change reaches your URL, with retries and a delivery log.
Accept or reject what you are billed. Full, partial or rejection receptor messages, stored next to the supplier XML and Hacienda’s response.
Security with nothing to configure. Encrypted PINs and credentials, webhooks only to public HTTPS and separate test and live keys. Security.
Five years of XML, without a hard drive in the office
The law requires issuers to keep their documents for five years. Every plan keeps 90 days with full download; Archeion keeps the five years: included from Escala up, or US$5 per company a month on Inicial and Crecimiento.
Archeion keeps the signed XML, Hacienda’s response and the PDF of every document for five years.
Search by period or key and download any file in seconds, from the portal or the API.
Import the history from your previous provider and export everything as a ZIP whenever you need it.
One issuer or five hundred, the same integration. For ERPs, point-of-sale systems and accounting firms.
- One account key to create issuers through the API
- Keys, .p12 certificate and ATV credentials per taxpayer
- 25,000 pooled documents and US$2 per active issuer
- Custom integration from US$500 if you’d rather we build it
Built by the Astra team
Aster is not a prototype. It is the engine that invoices every day for the businesses running on Astra, with thousands of documents accepted by Hacienda.
The same engine signs Astra’s documents and yours. When Hacienda changes something, we fix it once for everyone.
Live, public Hacienda status, so you know in seconds whether the problem is yours or Hacienda’s.
Validating, building and signing takes about 6 ms per document; with the registry lookups and storage, the whole trip stays under half a second. The rest is Hacienda.
Pricing that grows with your documents
Start free in Sandbox and go live from US$19 a month. Every plan includes all 7 document types, webhooks, PDF and email. Upgrade your plan or add a pack at any time.
What Hacienda changed is already handled
Every rule change reaches all customers the same day, without touching your integration.
Reference codes 13 to 17 (Nota 9): annulment and correction for material error, replacement of rejected documents and payment receipts.
Reference document types 19 and 20: export invoice and electronic payment receipt.
Returned IVA for health services: CABYS 93 at 4%, card payment and a cap, validated before signing.
Alphanumeric corporate IDs from the Registro Nacional in validation, keys and lookups.
Electronic payment receipt and the 0.5%, exempt and 0%-without-credit IVA rates of version 4.4.
-509: every CABYS on a credit or debit note is checked against the original document before sending.
-512: a credit note never exceeds the total of the invoice it corrects.
Exempt CABYS with rate 10, not another 0% rate, avoiding rejections -107, -483 and -485.
Unique consecutives per environment: a number that reached Hacienda, accepted or rejected, is never reused.
Reference code 99 with its mandatory description, so you never get rejection -491.
Everything you need to know about Aster
Do I need the cryptographic key (.p12) to start?
Not to test. With an aster_test_ key and no certificate, the sandbox signs with a platform certificate and returns a simulated verdict. For production you upload the .p12 you generate in ATV, its PIN and your ATV credentials; they are encrypted with AES-256-GCM. The certificate’s ID must match the issuer’s.
What is the difference between test and live?
aster_test_ keys submit to Hacienda’s staging environment (or the simulated sandbox) and never count toward your plan. aster_live_ keys submit to production and require a paid plan. Certificates and consecutive numbers are separate per environment.
What happens when Hacienda is down?
Aster still validates and signs, and queues the document (document.queued). When Hacienda is back it is resent automatically, with no retry limit, and you get the verdict by webhook. Live status lives at /haciendastatus.
How long do you keep my documents?
Every plan keeps the signed XML, Hacienda’s response and the PDF for 90 days, with full ZIP download. The five-year retention duty belongs to the issuer (CNPT art. 109); Archeion handles it for you: included in Escala, Plataforma and Empresa, and US$5 per company a month on Inicial and Crecimiento.
Is AstraNexo a registered systems provider?
Yes. AstraNexo is declared to the Dirección General de Tributación as a systems provider, and Aster fills in ProveedorSistemas for you. If your company is a registered provider, you can send your own ID.
Do prices include IVA?
Prices are in US dollars and exclude IVA. Costa Rican customers are charged 13% on top, and every payment produces an AstraNexo electronic invoice, issued with Aster, so you can claim that IVA.
What counts as a document?
Every production document with a final Hacienda verdict, accepted or rejected. A receptor message counts as half a document. Tests, retries and anything that never reached Hacienda do not count.
What if I use all the documents in my plan?
We email you at 80% and 100%. Upgrade your plan or add a pack at any time from the portal; the change applies in under a minute.
How do I migrate from another provider?
You keep your numbering: send your own consecutive numbers or set the next one. Reuse your certificate and ATV credentials, run in parallel with test keys and import your XML history into Archeion.
Can I issue for several taxpayers?
Yes. Crecimiento includes 10 issuers, Escala 50 and Plataforma as many as you need. Each issuer has its own keys, certificate and numbering.
Do you have SDKs?
The API is REST with JSON and an OpenAPI specification, so it works from any language. The docs include complete examples in curl, Node.js, PHP and Python, plus an interactive reference.
Ready to issue?
Free to start, no card required. Go live when your integration is ready.