Brzi start
Tipičan flow za bezgotovinski račun (e-commerce / booking):
- Kreiraj draft
- Fiskalizuj (asinhrono —
202 Accepted) - Poll status dok nije
Fiscalized(iliFailed/Offline)
1. Kreiraj draft
curl -X POST "https://api.fiskalmn.me/api/invoices/draft" \
-H "Authorization: Bearer fk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "Invoice",
"orderNumber": 0,
"typeOfInvoice": "NonCash",
"paymentMethod": "CARD",
"paymentDeadline": "2026-07-28T23:59:59Z",
"buyer": {
"idType": "TIN",
"idNumber": "12345678",
"name": "Kupac DOO",
"address": "Ulica 1",
"city": "Podgorica",
"country": "MNE"
},
"items": [
{
"name": "Rezervacija sobe",
"code": "ROOM-101",
"unit": "kom",
"unitPrice": 50.00,
"quantity": 1,
"vat": { "rate": 21 }
}
],
"note": "Narudžba #ORD-1001"
}'Odgovor sadrži id draft računa.
orderNumber: 0— sistem rezerviše sljedeći slobodan redni broj ako je 0 / nije eksplicitno potreban.
2. Fiskalizuj
curl -X POST "https://api.fiskalmn.me/api/invoices/{id}/fiscalize" \
-H "Authorization: Bearer fk_live_YOUR_KEY"Odgovor: 202 Accepted, status Pending.
3. Poll status
curl -X GET "https://api.fiskalmn.me/api/invoices/{id}" \
-H "Authorization: Bearer fk_live_YOUR_KEY"Kad je status = Fiscalized, koristite:
iic,fic,invoiceNumber- PDF:
GET /api/invoices/{id}/pdf
Preporučeni interval pollinga: 1–2 s, max ~30–60 s, sa exponential backoff.
Gotovina (POS)
Za gotovinske račune postoji one-shot endpoint:
POST /api/invoices/cash/create-and-print
Detalji u Endpointi.