Skip to content

FINA Certificate

FINA Certificate

Upload and manage the P12/PFX certificate required for Croatian CIS fiscalization

Upload FINA certificate

POST/fiscalization/fina/settings/certificate

Upload a P12/PFX certificate for CIS fiscalization. The certificate will be processed to extract expiry date and stored securely.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

filestring<binary>required

P12/PFX certificate file

import SpaceInvoices from '@spaceinvoices/js-sdk';
import fs from 'fs';

const sdk = new SpaceInvoices('YOUR_API_KEY');

// Read file as Buffer
const fileBuffer = fs.readFileSync('/path/to/image.png');
const file = new File([fileBuffer], 'image.png', { type: 'image/png' });

const response = await sdk.finaCertificate.uploadFinaCertificate({
  file,
  passphrase: "string"
});

console.log(response);

Returns

certificate_expirystring<date-time>
messagestring
json
{
  "certificate_expiry": "2026-12-31T23:59:59.000Z",
  "certificate_cn": "12345678901",
  "certificate_issuer": "FINA RDC 2015",
  "uploaded_at": "2025-06-15T10:30:00.000Z",
  "message": "Certificate uploaded and validated successfully"
}

Get certificate metadata

GET/fiscalization/fina/settings/certificate

Retrieve certificate metadata including expiry date and upload time. Does not return the certificate or private key.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.finaCertificate.getFinaCertificate();

console.log(response);

Returns

certificate_expirystring
certificate_cnstringnullable
certificate_issuerstringnullable
uploaded_atstring
messagestring
json
{
  "certificate_expiry": "2026-12-31T23:59:59.000Z",
  "certificate_cn": "12345678901",
  "certificate_issuer": "FINA RDC 2015",
  "uploaded_at": "2025-06-15T10:30:00.000Z",
  "message": "Certificate uploaded and validated successfully"
}

Delete FINA certificate

DELETE/fiscalization/fina/settings/certificate

Delete the FINA certificate for the entity. This will remove both the uploaded file reference and the extracted certificate from the database.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.finaCertificate.delete();

console.log('Deleted successfully');