upstream_rejected
Carried inside a 200 invoice body as `fiscal_error`. NOT an HTTP error.{ "id": "inv_01J9Z4T7M2K8Q6R3V5X1Y0B2C4", "status": "failed", "jir": null, "zki": "e4d909c290d0fb1ca068ffaddf22cbd0", "qr_payload": "https://porezna.gov.hr/rn?zki=e4d909c290d0fb1ca068ffaddf22cbd0&datv=20260827_1032&izn=450", "number": "1041", "occurred_at": "2026-08-27T10:32:11+02:00", "total": "4.50", "currency": "EUR", "fiscal_error": { "code": "upstream_rejected", "message": "The Tax Administration rejected the message. The sale is valid; the report needs correcting.", "retry_scheduled": false }}What happened
The message reached the Tax Administration and they refused it. Since 1 January 2026 any
restrictive-error violation causes outright rejection, wrapped as s013; a schema violation is
s001.
FiskHub validates the restrictive rules locally before sending, so this should be rare. When it does happen, it means the upstream rules and our local checks have diverged — usually because the specification changed.
Should you retry?
Not until something changes. retry_scheduled is false and the invoice is failed, which
the sweep deliberately leaves alone. Resending an identical message the Tax Administration has
already refused will be refused again.
The fix
-
Read
upstreamon the invoice. It carries their code and message verbatim, for debugging:{"upstream": {"code": "s013","message": "Poruka nije u skladu s restriktivnim pravilima."}}Do not branch on this — it is not part of the contract and their codes change on their schedule.
-
Look at what was sent. The most common causes are data FiskHub cannot infer is wrong: a VAT breakdown that does not sum to the total, a tax rate that was valid last quarter, a premises code that no longer matches the ePorezna registration.
-
Contact support if the request looks correct. A rejection of a request that passes our own validation means our validation is behind the specification, and that is ours to fix.
-
Retry once corrected:
Terminal window curl -sS -X POST \"https://api.fiskhub.com/v1/invoices/inv_01J9Z4T7M2K8Q6R3V5X1Y0B2C4/retry" \-H "Authorization: Bearer $FISKHUB_API_KEY"