e-bon
e-bon.ro
Compliance

ANAF reporting — JE, MF, P7B and submission states

How to generate the Jurnal Electronic XML and Memorie Fiscală archive with e-bon, sign them with your P7B certificate, and track the four ANAF submission states.

Romanian fiscal law requires every AMEF (electronic fiscal cash register) to keep a structured trail of every operation and every daily closing, and to make that trail available to ANAF. e-bon builds the two ANAF artifacts — the Jurnal Electronic (JE) XML and the Memorie Fiscală (MF) archive — directly from the receipts and Z-reports your devices have already recorded.

You then sign each file with your qualified electronic certificate and submit it through Spațiul Privat Virtual (SPV) at anaf.ro.

Understand the four report types

ReportWhat it isSubmitted to ANAF?
Raport XMid-shift snapshot of totals — read-only, does not close the dayNo
Raport ZEnd-of-day fiscal closing — irreversible, source of truth for the dayNo (kept in fiscal memory; feeds MF)
Jurnal Electronic (JE)Monthly XML of every fiscal operation for a deviceYes — submitted via SPV
Memorie Fiscală (MF)Archive of every Z-report closing for a deviceYes — submitted via SPV

Raport X is operational only — useful for the cashier, never sent anywhere. Raport Z is the daily source of truth and feeds MF. JE captures the per-operation detail; MF captures the per-closing summary. Both JE and MF are operator obligations toward ANAF.

Generate the JE XML

The Jurnal Electronic is a monthly XML document containing every fiscal operation a device performed. e-bon assembles it from your receipts and reports for the period you request.

Request the XML for one device and one period:

GET /api/v1/reports/je/xml?deviceId={deviceId}&periodStart={iso-date}&periodEnd={iso-date}

The response is the JE document with root element <JurnalElectronic xmlns="urn:anaf:je:v1" versiune="1.0">, ready to sign.

Read the operation types in the XML

Each fiscal operation appears as an <Operatiune> element. The <Tip> field carries the ANAF Romanian label:

OperationANAF label
Fiscal receiptbon_fiscal
X reportraport_x
Z reportraport_z
Cash depositalimentare_numerar
Cash withdrawalretragere_numerar
Voidanulare

Each entry also includes the date and time, the fiscal series, the receipt or report ID, the amount with two decimals, the operator, an optional QR code, and an optional VAT breakdown by rate.

e-bon escapes special characters in operator IDs, fiscal series and QR data, and formats every monetary value to exactly two decimals. The XML is well-formed by construction.

Generate the MF archive

The Memorie Fiscală archives every Z-report closing for a device across a period, with a running grand total that ANAF expects to match the device's lifetime turnover.

Request the archive:

GET /api/v1/reports/mf?deviceId={deviceId}&periodStart={iso-date}&periodEnd={iso-date}

Each Z-report in the archive contains:

  • Z-report number and closing date
  • Fiscal series of the device
  • Total sales, total refunds, net amount for the day
  • Receipt count and VAT breakdown by rate
  • Running grand total — the cumulative netAmount across every Z-report from the start of the period through this closing

The grand total on the last entry equals the document-level grand total ANAF expects from a fiscal memory dump.

Sign with your P7B certificate

ANAF requires the JE XML to be wrapped in a PKCS#7 / CAdES-BES detached signature with a .p7b extension. The signature must be produced with the qualified certificate of your legal representative — typically a USB cryptographic token, or a qualified remote signing service.

You sign the XML externally. e-bon never holds your signing certificate. Use your USB token or your qualified signing provider to produce the .p7b file, then attach it to the e-bon submission record.

Track the four submission states

When you record a JE or MF submission with e-bon, the anafStatus field accepts one of four values:

  • pending — submission created and queued or in flight; ANAF has not yet returned a final decision.
  • accepted — ANAF received and accepted the submission; your obligation for the period is fulfilled.
  • rejected — ANAF received the submission and rejected it; you must correct it and resubmit. See troubleshooting an ANAF rejection.
  • error — submission failed before reaching a final ANAF decision (transport failure, malformed envelope, certificate problem); retry is required.

Leave anafStatus unset until you have a real status to record. The companion boolean submittedToAnaf records whether you have actually submitted the file in SPV.

Submit JE and MF end-to-end

Close the day on every device

Each device closes its day with a Z-report:

POST /api/v1/reports/z

Z-reports are the source of truth that both JE and MF are built from.

Generate the JE XML at month end

GET /api/v1/reports/je/xml?deviceId={deviceId}&periodStart={iso-date}&periodEnd={iso-date}

Save the response as JE_{cui}_{period}.xml.

Sign the XML to a .p7b file

Hand the XML to your USB token or qualified signing service. The output is a detached PKCS#7 / CAdES-BES .p7b file covering the XML byte-for-byte.

Submit the file in SPV

Log in to Spațiul Privat Virtual and submit the XML together with its .p7b signature. ANAF returns a recipisă (receipt) once they accept or reject the file.

Record the submission in e-bon

POST /api/v1/reports/je
{
  "deviceId": "...",
  "xmlContent": "<JurnalElectronic ...>...</JurnalElectronic>",
  "p7bSignature": "<base64 P7B>",
  "reportDate": "2026-04-30",
  "submittedToAnaf": true,
  "anafStatus": "accepted"
}

p7bSignature and anafStatus are optional — fill them in once you have ANAF's response.

Repeat for MF

GET /api/v1/reports/mf?deviceId={deviceId}&periodStart={iso-date}&periodEnd={iso-date}
POST /api/v1/reports/mf

The MF flow mirrors JE: generate, sign, submit in SPV, then record the submission in e-bon with the resulting status.