Croatia (FINA)
Full support for Croatian B2C fiscalization requirements (FINA).
Prerequisites
| Requirement | Description |
|---|---|
| OIB | Entity with Croatian OIB (tax number) |
| Certificate | Digital certificate (.p12) from FINA |
Scope
| Transaction | Status |
|---|---|
| B2C domestic | Fiscalized via FINA |
| B2B foreign | Allowed, no fiscalization |
| B2B domestic | Not supported (Fiskalizacija 2.0 requirements) |
Setup
1. Upload Certificate
import SpaceInvoices from "@spaceinvoices/js-sdk";
const sdk = new SpaceInvoices("YOUR_API_KEY");
await sdk.finaCertificate.uploadFinaCertificate({
file: fs.readFileSync("certificate.p12"),
passphrase: "cert-password",
});2. Register Business Premise
Register your business location with a unique premise ID. This creates the premise and registers it with FINA.
const _premise = await sdk.finaPremises.create({
business_premise_name: "OFFICE1",
});If your FINA numbering sequence is per premise (P), you can pass starting_number when creating the premise. The first fiscal invoice for that premise sequence uses that value.
3. Register Electronic Device
Register a device for the premise. Device IDs are numeric (e.g., 1, 2, 3).
await sdk.finaDevices.registerFinaDevice("prm_123", { electronic_device_name: "1" });If your FINA numbering sequence is per device (N), you can pass starting_number when registering the device. You can also update or clear a premise or device starting number with the PATCH endpoints, but only before any fiscal document counter has been created for that sequence. If unified numbering is enabled, invoices for foreign customers use the same fiscal sequence, so the configured starting number applies to those documents as well.
4. Enable FINA
await sdk.finaSettings.update({ enabled: true });Fiscalized Invoices
Invoices are automatically fiscalized when FINA is enabled:
const _invoice = await sdk.invoices.create({
items: [{ name: "Service", quantity: 1, price: 100 }],
fina: {
business_premise_name: "OFFICE1",
electronic_device_name: "1",
},
});FINA returns confirmation data on the invoice:
jirzkiQR Code
Fiscalized invoices include a verification QR code linking to the Croatian tax authority, embedded automatically in the PDF:
const _pdf = await sdk.invoices.renderPdf(invoice.id);