Croatia (FINA)
Croatia requires every domestic consumer invoice, and domestic business invoices paid in cash or by card, to be fiscalized in real time. Space Invoices does this for you through FINA.
| Need | Guide |
|---|---|
| Fiscalize B2C invoices, and B2B invoices paid in cash or by card, with CIS (JIR, ZKI) | This guide |
| Send and receive B2B eRačun (Fiskalizacija 2.0) through FINA e-Račun | Croatia eRačun (FINA) |
What Space Invoices handles
- We fiscalize each invoice with the Tax Administration’s CIS in real time and store the JIR and ZKI.
- We print the JIR, ZKI and verification QR code on the invoice PDF.
- We number invoices in the FINA format (premise, device, sequence).
- We send the buyer’s OIB for domestic business invoices.
- We retry invoices that could not be fiscalized because FINA was unavailable.
- We fiscalize the credit note when you void or credit an invoice that was fiscalized.
- A fiscalized advance invoice cannot be voided. To reverse it, issue a credit note against it (
linked_documents: ["adv_..."]). The advance invoice must be fully paid and not yet applied to a final invoice. The credit note is fiscalized with negative amounts. It is always sent to CIS (a credit note that CIS would not receive is refused), and one credit note cannot mix advance invoices with invoices.
Not supported:
- Domestic B2B invoices that are not paid in cash or by card, unless the entity issues eRačun through FINA e-Račun (see Croatia eRačun (FINA)). Without it they are rejected with
422. - Registering premises or devices with the Tax Administration. You do that yourself on ePorezna.
Laws and standards
| Name | What it is |
|---|---|
| Zakon o fiskalizaciji (Fiscalization Act) | Croatian law requiring real-time fiscalization of invoices. |
| Fiskalizacija 2.0 / eRačun | The B2B e-invoicing regime. Space Invoices issues eRačun through FINA e-Račun when enabled for the entity. |
| CIS | Porezna uprava’s central information system that receives fiscalized invoices. |
| JIR and ZKI | The unique invoice identifier CIS returns, and the issuer’s protective code. Both appear on the invoice. |
| ePorezna | The Tax Administration portal where you register business premises. |
| FINA fiscal certificate | The .p12 certificate that signs your fiscalization requests. |
Before you start
| You need | Where you get it |
|---|---|
| Croatian OIB | Your tax number, set on the entity. |
| Business premise label (oznaka poslovnog prostora) | Register each premise on ePorezna. |
FINA fiscal certificate (.p12) and its password | Order it from FINA. |
Setup
Do this once per entity. You can also do it in the Space Invoices app under FINA settings.
1. Upload the certificate
import fs from "node:fs";
import SpaceInvoices from "@spaceinvoices/js-sdk/sdk";
const sdk = new SpaceInvoices("YOUR_API_KEY");
const file = new File(
[new Uint8Array(fs.readFileSync("certificate.p12"))],
"certificate.p12",
{ type: "application/x-pkcs12" },
);
await sdk.finaCertificate.uploadFinaCertificate({
file,
passphrase: "cert-password",
});2. Add the business premise
Use exactly the label you registered on ePorezna.
const _premise = await sdk.finaPremises.create({
business_premise_name: "OFFICE1",
});3. Add an electronic device
A device is a number (digits only) that identifies a cash register or billing point.
await sdk.finaDevices.registerFinaDevice("prm_123", {
electronic_device_name: "1",
});4. Enable FINA
await sdk.finaSettings.update({ enabled: true });Issue a compliant invoice
Create invoices as usual. On top of the standard invoice fields, add:
Consumers (B2C)
| Field | When |
|---|---|
fina.business_premise_name, fina.electronic_device_name | Always. |
payments (or fina.payment_type) | Always. The payment method is reported to CIS. |
const _invoice = await sdk.invoices.create({
items: [{ name: "Haircut", quantity: 1, price: 40, taxes: [{ rate: 25 }] }],
payments: [{ type: "card" }], // Croatia: reported to CIS
fina: {
business_premise_name: "OFFICE1", // Croatia: as registered on ePorezna
electronic_device_name: "1", // Croatia: device number (digits only)
},
});Business customers (B2B)
| Field | When |
|---|---|
customer.tax_number | Always. The buyer’s OIB, 11 digits, with or without the HR prefix. |
payments | Always. Exactly one cash or card payment covering the full total. |
fina.business_premise_name, fina.electronic_device_name | Always. |
Do not set customer.is_end_consumer to true: that makes the invoice a consumer invoice and no OIB is sent. Foreign business customers are not fiscalized.
const _invoice = await sdk.invoices.create({
customer: {
name: "Primjer d.o.o.",
country_code: "HR",
tax_number: "12345678903", // Croatia: buyer OIB, sent to CIS
},
items: [
{
name: "Consulting",
quantity: 1,
price: 100,
taxes: [{ rate: 25 }],
},
],
payments: [{ type: "card", amount: 125 }], // Croatia: covers the full total
fina: {
business_premise_name: "OFFICE1", // Croatia: as registered on ePorezna
electronic_device_name: "1", // Croatia: device number (digits only)
},
});What you get back
| Field | Meaning |
|---|---|
fina.data.jir | Unique invoice identifier from CIS (Jedinstveni identifikator računa). |
fina.data.zki | Issuer’s protective code (Zaštitni kod izdavatelja). |
fina.data.qr_code_url | Verification QR code link, also printed on the PDF. |
const _pdf = await sdk.invoices.renderPdf(invoice.id);Special cases
- Domestic B2B payment rule. An invoice with a buyer OIB is fiscalized only with exactly one cash or card payment that covers the full total. If you also send
fina.payment_type, it must name the same method. Other cases are rejected with422unless the entity issues eRačun through FINA e-Račun. A drafted invoice is checked when you finalize it. - Advance invoices. A B2B invoice can be settled by linked advance invoices if each is fiscalized, issued to the same buyer OIB, and paid with the same method (cash or card). One more payment of that method can complete the total.
- Order integrations. A paid order is fiscalized as B2B only when its payment is one cash or card transaction for the full order total.
- Payments are fixed after fiscalization. Once a B2B invoice, credit note or advance invoice has been fiscalized with the buyer OIB, you cannot add, delete or change payments or advance links. Issue a credit note instead (
fina_b2b_payment_type_not_allowed). - Issuers outside the VAT system. If the entity has
is_tax_subject: false, a domestic B2B invoice that is both dated and created before 2027-01-01 (Europe/Zagreb) accepts any payment method and is not fiscalized. B2C invoices are still fiscalized. Voiding such an invoice later, even in 2027, does not fiscalize the credit note. From 2027-01-01 the normal rules apply to new invoices. An omitteddatemeans today in Europe/Zagreb. - Wrong buyer OIB. Correct it with
POST /invoices/{id}/change-buyer-oiband{ "fina": { "buyer_oib": "..." } }, or sendnullto remove it. CIS accepts this only on the issue day, before midnight in Europe/Zagreb. After that, issue a credit note and a corrected invoice. Setting an OIB needs the same single full cash or card payment. Details are in the API reference. - FINA unavailable. We retry automatically with the original issue time and mark it as a subsequent submission. CIS accepts these only within 30 days of the issue date; older invoices are not sent.
- Starting numbers. You can pass
starting_numberwhen adding a premise or device if your numbering is per premise or per device. You can change it until the first fiscal number is issued.
const _updated = await sdk.invoices.changeInvoiceBuyerOib(invoice.id, {
fina: { buyer_oib: "12345678903" }, // null removes the OIB
});B2B paid in cash or by card
A business customer who pays in cash or by card stays a business: the invoice goes to CIS with the buyer’s OIB and is never an eRačun, even when the entity has eRačun turned on. This needs the ordinary CIS setup (FINA enabled, certificate, business premise and electronic device) and one cash or card payment covering the full total. KPD codes are not needed, because they are checked only for an eRačun. The payment cannot later be changed to another method, and no copy is sent over Peppol.
A credit note that has no payment and no fina.payment_type follows the route of the invoice it corrects with linked_documents. For an invoice fiscalized with the buyer’s OIB it is fiscalized with the invoice’s cash or card method and the same OIB, so you only add the business premise and electronic device. If you send payments or fina.payment_type yourself, the usual rules apply.
eRačun through FINA e-Račun
Domestic B2B invoices and credit notes that do not qualify for the cash or card path are issued as an eRačun when the entity has turned on sending and FINA has registered its power of attorney. FINA fiscalizes and reports them, so they are not sent to CIS and carry no ZKI or JIR. Setup, KPD codes, delivery status, credit notes and receiving supplier eRačun are in Croatia eRačun (FINA).
Common errors
| Error | Fix |
|---|---|
400 business_premise_name is required in fina property (same for electronic_device_name) | Send both fina fields on every domestic invoice. |
400 requires a valid payment type | Add payments or fina.payment_type. |
422 FINA fiscalization must be enabled | Upload the certificate, add a premise and device, and enable FINA. |
422 domestic B2B not paid in cash or by card | Use exactly one full cash or card payment, or set is_end_consumer: true for a consumer. |
fina_b2b_payment_type_not_allowed | The payment of a fiscalized B2B invoice is fixed. Issue a credit note. |
fina_payment_change_window_expired | The buyer OIB can only change on the issue day. Issue a credit note and a new invoice. |
fina_buyer_oib_invalid | The OIB must be 11 digits with a valid check digit. |
fina_unreachable (503) | CIS could not be reached. Repeat the same request. |
409 ADVANCE_INVOICE_FISCALIZED_VOID_UNSUPPORTED | A fiscalized advance invoice cannot be voided. Issue a credit note with linked_documents: ["adv_..."]. |
422 ADVANCE_INVOICE_NOT_FISCALIZED | The advance invoice has no successful FINA fiscalization, so it cannot be credited this way. |
422 CREDIT_NOTE_ADVANCE_NOT_PAID | The advance invoice must be fully paid before you credit it. |
409 CREDIT_NOTE_ADVANCE_ALREADY_DEDUCTED | The advance invoice is already applied to a final invoice. |
422 CREDIT_NOTE_ADVANCE_FISCALIZATION_REQUIRED | A credit note that reverses a fiscalized advance invoice must itself be fiscalized. |
Related API
Invoices · FINA certificate · FINA premises · FINA devices · FINA settings