v1 integration contract for Italy. You create an ita API key, onboard a merchant with an Italian fiscal_identity (Codice Fiscale + Partita IVA + Fisconline credentials), register a location and terminal, fiscalize the register under the RT regime, open a register session, start an operation, and complete it with the typed payment contract.
Examples use
https://sandbox.api.openfiskal.com/v1. Replace with https://api.openfiskal.com/v1 when you go live.Prerequisites
- An OpenFiskal tenant
- A tenant-scoped, country-scoped API key (
of_test_ita_…orof_live_ita_…) - Active Fisconline credentials for the legal entity (delegated user, password, PIN)
curlor an HTTP client- A backend service / database to store your API key, entity IDs and ETags
Authentication model
Use the standard bearer header on every request. The key encodes the environment and country —of_test_ita_… for the Italian sandbox, of_live_ita_… for Italian production. An ita key rejects payloads for any other country.
POST /merchants, not your API key.
Create resources
Create these resources in order. The register cannot fiscalize until the merchant has anITA fiscal_identity with the Fisconline credentials populated.
Create your API key
Generate an
ita key at console.openfiskal.com. Store it in your secrets manager. Format: of_{env}_ita_{random}, e.g. of_test_ita_abcdefgh12345678.Create a merchant
country_code and every address.country_code must be ITA (ISO 3166-1 alpha-3). The Italian fiscal_identity requires:legal_entity_type—COMPANYorINDIVIDUALtax_number— Codice Fiscale (11 numeric digits, or 16 alphanumeric characters)vat_number— Partita IVA (11 numeric digits)fisconline_user— Codice Fiscale (16 alphanumeric characters) of the person delegated to access the Agenzia delle Entrate portal on behalf of the entityfisconline_passwordfisconline_pin
id becomes the X-OpenFiskal-Merchant header on every merchant-scoped request that follows.Fiscalize the register (rolling out)
Once enabled for IT,
POST /registers/{id}/fiscalize registers the Registratore Telematico with the Agenzia delle Entrate using the merchant’s Italian fiscal_identity and the location’s country. The response is 202 Accepted; poll GET /registers/{id} until fiscalization_status is "fiscalized" (the timestamp is fiscalization.fiscalized_at). Until IT is enabled for your tenant this call returns 422 validation_error.Perform a fiscalized sale
Once your register is fiscalized, you can create and complete sale operations. The request body is identical to other countries; the response’sfiscal_information carries the RT-specific shape, including the DCW number that you must render onto the customer’s receipt.
Open a session
Every POS sale, return, or exchange must bind to an open register session. Send a Persist the returned
session_open operation with the register, currency, and counted opening cash float. Without an open session, POST /operations with source: POS is rejected.session_id. See Sessions for cash adjustments, end-of-shift counting, and closing.Start an operation
POST /operations is a single-shot create. All monetary fields are decimal strings, not integers. pretax_amount + tax_amount + tip_amount must equal total_amount. line_items is required with at least one entry.Complete the operation
Completion includes typed payment legs. Use one entry per tender leg and include processor references where available. Send the latest
ETag in If-Match.The completed-operation response carries the RT regime’s
fiscal_information, including the DCW number you must render onto the customer’s receipt. Schema reference: see the Live OpenAPI spec once IT is enabled on your tenant.Void an open operation
If the sale is abandoned before completion, void the open operation:Next steps
- Transaction lifecycle — operation lifecycle in detail
- Payment lifecycle — split tender, asynchronous settlement