Status values in receipts, devices and webhooks
Status values in receipts, devices and webhooks
When you read an API response, receive a webhook or look at a Portal screen, you'll see status fields with a small set of fixed values. This page lists every value you can encounter, what it means in business terms, and when e-bon sets it.
Track receipt command status
When you send a receipt or any other fiscal command to a device, e-bon assigns a status to the command and updates it as the device picks it up and responds.
| Value | When you'll see it |
|---|---|
pending | The command has been accepted by e-bon and is waiting to be delivered to the device. |
sent | The command is on its way to the device — either over the live connection or via push wakeup. |
completed | The device confirmed the command ran successfully. This is a final state. |
failed | The device reported an error, or delivery failed. This is a final state. |
timeout | The device didn't respond within the safety window (60 s for push delivery, 180 s overall). Final. |
Typical lifecycle:
POST /api/v1/devices/:deviceId/commands
│
▼
┌──────────┐
│ pending │
└────┬─────┘
│ delivery starts
▼
┌──────────┐ device confirms success ┌────────────┐
│ sent │ ─────────────────────────────▶ │ completed │ (final)
└────┬─────┘ └────────────┘
│ device returns an error
▼
┌──────────┐
│ failed │ (final)
└──────────┘
The wakeup wait expires (60 s) or the safety sweeper picks up
a command stuck in pending/sent for more than 180 s:
┌──────────┐
│ timeout │ (final)
└──────────┘
Once a command reaches completed, failed or timeout, e-bon will not change it again.
Where you see it:
- API responses for
GET /api/v1/commands/:idandGET /api/v1/devices/:deviceId/commands/:id, on thestatusfield. - Webhook payloads
command.completed,command.failedandcommand.timeout— see Webhook events. - Portal Devices → Activity column.
For the full delivery flow (live connection plus push fallback), see Receipt emission flow. For the catalogue of command types, see Command types.
Read device connectivity status
Each AMEF device registered in e-bon carries a connectivity status that reflects whether the cloud can reach it right now.
| Value | When you'll see it |
|---|---|
online | The device is connected to e-bon and ready to receive commands. |
offline | The device is not currently connected. New commands will queue until it's back. |
The device flips between online and offline for the entire life of its registration; there is no final state.
Where you see it:
- API responses for
GET /api/v1/devicesandGET /api/v1/devices/:id, on thestatusfield. - Webhook payloads
device.onlineanddevice.offline. - Portal device card status badge (red/grey).
Read webhook delivery status
Every webhook event e-bon sends to your endpoint creates a delivery record with its own status. You can inspect deliveries to debug your integration.
| Value | When you'll see it |
|---|---|
pending | The delivery is queued or is between retry attempts. Final state has not been decided yet. |
success | Your endpoint returned a 2xx response on one of the attempts. Final. |
failed | All five delivery attempts failed. Final. |
Lifecycle:
dispatch
│
▼
┌──────────┐ attempt 1 succeeds (2xx) ┌──────────┐
│ pending │ ──────────────────────────▶ │ success │ (final)
└────┬─────┘ └──────────┘
│ attempt fails
▼
┌──────────┐ later attempt succeeds ┌──────────┐
│ pending │ ──────────────────────────▶ │ success │ (final)
│ retrying │
└────┬─────┘
│ attempt 5 still fails
▼
┌──────────┐
│ failed │ (final)
└──────────┘
After a non-2xx response the delivery stays pending and is retried on the schedule [60 s, 5 min, 30 min, 2 h, 12 h]. A maximum of 5 attempts is made. If a webhook accumulates 20 consecutive failed deliveries, it is auto-disabled and an admin must re-enable it from the Portal.
Where you see it:
- API response for
GET /api/v1/webhooks/:id/deliveries, on thestatusfield. - Portal Settings → Webhooks → deliveries panel.
- The parent webhook also exposes
lastDeliveryStatus(successorfailed), updated on each final outcome.
For the retry contract, the auto-disable rule and how the response body is captured, see Webhook events.
Read device alert severity
When a device is in a state that needs attention (paper running low, cover open, Z report overdue, etc.), e-bon attaches a severity to each alert it surfaces.
| Value | When you'll see it |
|---|---|
warning | Used for non-blocking conditions: low paper, fiscal memory almost full, Z report overdue. |
error | Used for blocking conditions: cover open, device disconnected. |
Alerts are computed at read time from the device's current state — they are not stored. When a device has multiple alerts, the highest severity wins the badge color in the Portal (errors trump warnings).
Where you see it:
- API responses for
GET /api/v1/devices/alertsandGET /api/v1/devices/:id/alerts, on theseverityfield of each alert. - Portal device card badge color.
For the rules and thresholds behind each alert type, see Portal alerts.
Track ANAF report status
Electronic Journal (Jurnal Electronic, JE) reports carry an ANAF acceptance status that reflects what happened after the operator submitted the file to ANAF SPV.
| Value | When you'll see it |
|---|---|
pending | The report has been submitted to ANAF SPV; the operator hasn't recorded a result. |
accepted | The operator has marked the SPV submission as accepted by ANAF. |
rejected | The operator has marked the SPV submission as rejected by ANAF. |
error | The operator has marked the SPV submission as having errored (e.g. transport error). |
PATCH /api/v1/reports/je/:id with the new anafStatus. The accepted, rejected and error values can be re-set if the operator needs to correct an earlier entry. JE generated (status absent or 'pending')
│
▼
┌──────────────────┐
│ pending │
└────────┬─────────┘
│ operator submits to SPV, then PATCHes the report:
├────────────▶ ┌──────────┐
│ │ accepted │
│ └──────────┘
├────────────▶ ┌──────────┐
│ │ rejected │
│ └──────────┘
└────────────▶ ┌──────────┐
│ error │
└──────────┘
Where you see it:
- API responses for
GET /api/v1/reports/jeandGET /api/v1/reports/je/:id, on theanafStatusfield. - Portal Reports → ANAF status column.
For the SPV submission process and the legal background, see ANAF reporting.
Identify receipt types
Each receipt carries a type that indicates its legal nature. The type is set when the receipt is emitted and never changes afterwards.
| Value | What it means |
|---|---|
sale | A standard sale receipt — the dominant case. |
refund | A refund receipt; reverses cash but does not have the legal status of a storno. |
storno | A fiscal-reversal (storno) receipt that legally cancels an earlier sale and references the original. |
print_reversal_receipt command (see Command types). For the legal definition of a storno, see the glossary.Where you see it:
- API responses for receipt resources, on the
Receipt.typefield. - Portal Receipts → Type column.
Identify user roles
Each user belongs to an organization with one of three roles. Role changes are applied directly by an admin or owner — there is no transition workflow.
| Value | What it grants |
|---|---|
owner | Full administrative control: billing, member management, irreversible actions like deleting the organization. |
admin | Full operational control short of owner-only actions: manage devices, locations, members, reports, webhooks, API keys. |
operator | Day-to-day use: issue receipts, run reports, view alerts. Cannot change organization-level settings. |
Where you see it:
- The role appears as a claim on every authenticated request and in the
User.rolefield on member-listing and current-user endpoints. - Portal Settings → Organization → Members column.
For how each role gates the API and the full RBAC matrix, see Authentication and authorization.
Identify subscription plans
Each organization is on one of three subscription tiers. The plan controls device caps, API throughput and access to paid features.
| Value | What it means |
|---|---|
free | Default tier — capped device count, capped API throughput, limited webhook subscriptions. |
pro | Paid tier — higher caps, full webhook fan-out, full report retention. |
enterprise | Negotiated tier — bespoke caps, priority support routing. |
Where you see it:
- API responses, on the
Organization.planfield. - Portal Settings → Subscription.
Tier-enforcement is applied on every API request to gate paid features — see Authentication and authorization.
Where to next
- Commands API — request envelope and polling contract for receipt commands.
- Webhook events — full payload list, including
command.completed,command.failed,command.timeout,device.onlineanddevice.offline. - Portal — Devices — where device status and alert severities surface in the UI.
- Portal — Alerts — derivation rules behind each alert.
- Receipt emission flow — full command lifecycle including the live-connection / push-wakeup fallback.
- Webhook events — full delivery lifecycle and retry contract.
- Authentication and authorization — role gates and plan-tier enforcement.
- ANAF reporting — operator-driven ANAF status workflow.
- Glossary — Romanian fiscal vocabulary referenced here (storno, AMEF, raport Z, etc.).
- Command types — per-type catalogue that uses the command status lifecycle.