Overview
There are two ways to connect registers to OpenFiskal:- Server-side — your backend calls the API on behalf of all registers.
- Device-direct — each register calls the API itself, with no backend in between.
Both topologies use the same API endpoints and produce the same fiscal outcomes. The difference is where the credentials live and who makes the HTTP calls.
Server-side
Your backend server holds a platform API key and sends it directly in theAuthorization: Bearer header on every request. The registers themselves never talk to OpenFiskal.
How it works:
- Your backend includes the platform API key in the
Authorization: Bearerheader on every request. - When a register reports a sale, your backend calls
POST /registers/:id/saleswith the API key and theOpenFiskal-Organizationheader. - OpenFiskal returns the fiscal document. Your backend passes the receipt data back to the register.
- Traditional POS systems with a backend (restaurant, retail, hospitality)
- Cloud-based POS where the server already manages register state
- Any setup where devices have reliable connectivity to your own infrastructure
- One API key to manage — no per-device key distribution.
- The API key stays on your server, never on hardware that could be physically compromised.
- Single key works across all organizations and registers.
- Backend can add business logic (validation, enrichment) before calling OpenFiskal.
- Extra dependency — fiscal calls go register → backend → OpenFiskal. If the backend is down, registers must queue locally until it recovers (see Offline Guidance).
- Adds latency — every fiscal call round-trips through your server.
- You must build and operate the backend.
Device-direct
Each register holds its own long-lived API key and calls OpenFiskal directly. No backend is involved in fiscal operations. How it works:- During provisioning, your backend creates the register and fiscal unit with
issue_register_credential: true. This returns a one-time register API key. - You securely push the API key to the device (over a provisioning channel, device management platform, or at manufacturing time).
- The device includes the key in the
X-Register-Api-Keyheader for all API calls.
- Unattended hardware — EV chargers, fuel pumps, vending machines, self-service kiosks.
- Devices that operate without reliable connectivity to your own backend.
- Edge deployments where a central server is impractical.
- No backend dependency for fiscal operations — the device talks directly to OpenFiskal.
- Simpler architecture for autonomous hardware.
- Each device is independent — one going offline does not affect the others.
- One API key per register. At 500 devices, that is 500 keys to distribute and track.
- Keys are long-lived and stored on physical hardware — a stolen device means a compromised key. Rotate immediately via
POST /registers/:id/credentials/rotate. - The device firmware must handle retries and offline queuing directly (see Offline Guidance).
Choosing a topology
| Factor | Server-side | Device-direct |
|---|---|---|
| Credential management | One platform API key | One API key per device |
| Backend required | Yes | Only for provisioning |
| Credential exposure risk | Low (server only) | Higher (on physical hardware) |
| Offline queuing | At the backend (if OpenFiskal is unreachable) or at the register (if your backend is unreachable) | At the register (if OpenFiskal is unreachable) |
| Typical use case | Attended POS (restaurant, retail) | Unattended hardware (EV, kiosk, vending) |
Hybrid approach
Some integrations use both. The backend handles provisioning, fleet management, and monitoring (using platform API keys), while the registers handle real-time fiscal operations directly (using register API keys). This is common for EV charging networks: a fleet management platform provisions and monitors chargers centrally, but each charger handles its own fiscal operations over cellular.Provisioning device-direct registers
For device-direct integrations, provisioning involves three steps — all done from your backend using platform API keys:Create a fiscal unit with a register API key
Pass
issue_register_credential: true to receive a device-scoped API key.Push the key to the device
Deliver the API key and register ID to the device over a secure channel — your device management platform (MDM), a secure provisioning API, or a factory burn process.The device stores these two values and uses them for all subsequent API calls:
register_id— to build endpoint URLs (/registers/:id/sales, etc.)register_api_key— for theX-Register-Api-Keyheader