Step-by-Step Integration
The SIGN ES (Unified API) is currently available in the test environment for initial development and testing, though only a limited set of options can be tested at this stage. Production is not yet activated. For production use, please use the Specialized SIGN ES API.
To begin the integration process, please refer to the detailed step-by-step instructions provided here.
The accompanying diagram illustrates the workflow and highlights the essential steps necessary to successfully complete your integration, for which you will need to utilize our SIGN ES (Unified API).
Register on HUB
Begin by registering on the fiskaly HUB. For more guidance on getting started, head to our HUB - First steps section.
Create Account & Organization GROUP
Creating a fiskaly Account is the first step, after which you can proceed with setting up the first organizational structure for your business and generating your API Key.
The Account represents the PoS provider or a retailer that operates its own PoS system. It is the top-level organization in the structure.
After creating your fiskaly Account, you will be taken to the Organization Selector where you can create your Group.
A Group is an intermediate level within an Account that helps you organize multiple Units into logical clusters.
Create API Key
The next step is to generate an API Key for your organization via the HUB. This API Key and Secret pair is required to create your first Organization of type
UNIT(Step 5).💡TEST vs. LIVE environmentsAPI Keys generated in the TEST environment (
https://test.api.fiskaly.com) will create TEST resources, while those from the LIVE environment (https://live.api.fiskaly.com) will create LIVE resources.
Create Token
Starting from this step, you will be using the SIGN ES (Unified API).
Call the
createTokenendpoint with the API Key and Secret from step 3 to obtain abearertoken. Include this token in theAuthorizationheader of steps 5 and 6.Create Organization UNIT
Create an Organization of type UNIT via the
createOrganizationendpoint. A UNIT represents a single legal entity (merchant). You will need to create one Organization UNIT for each taxpayer representation you manage.Using the bearer token generated in Step 4 with the API Key and Secret created for your Group ensures the UNIT is correctly nested under that Group in the hierarchy.
Create Subject (API Key)
Create a Subject of type
API_KEYfor the Organization UNIT via thecreateSubjectendpoint.To associate the Subject (API Key) with your UNIT, include the
X-Scope-Identifierheader set to theidof the Organization UNIT in your request.Create new Token
Create a token using the Subject API Key and Secret you just generated. This bearer token will be used for all subsequent steps to create resources within the corresponding Organization UNIT.
Create Taxpayer
Now you’re ready to start creating the operational parts required for fiscalisation in Spain.
Use the
createTaxpayerendpoint to create the representation of a taxpayer as follows:- Set the taxpayer as type Company (legal entity) or Individual (natural person).
- Provide the taxpayer’s Spanish NIF (Número de Identificación Fiscal).
- The taxpayer’s fiscal territory determines whether Verifactu, SII, or TicketBAI applies — see the SIGN ES introduction for how these regulations map to Spanish territories.
Once you create a
Taxpayer, its state is set toACQUIREDby default. To make it fully functional, update the state toCOMMISSIONEDusing theupdateTaxpayerendpoint.Create Location
📘NoteA
HEAD_OFFICElocation is automatically created upon Taxpayer creation and shares the same UUID as the Taxpayer. However, for fiscalisation purposes, we recommend creating a separate location of typeBRANCH(it may have the same address). If there are multiple locations, a corresponding branch should be created for each one.For each operating business location, create a Location of type
BRANCHvia thecreateLocationendpoint.Once a Location is created, its state is set to
ACQUIREDby default. Update the state toCOMMISSIONEDusing theupdateLocationendpoint before proceeding.Create System
The
createSystemendpoint allows you to create an abstraction of every Electronic Recording System used for fiscal operations. Every cash register or point of sale needs to be provided as a new System of typeFISCAL_DEVICE.- A System will be connected to a specific, previously created Location of type
BRANCH.
Once a System is created, its state is set to
ACQUIREDby default. To create Records, its state must be updated toCOMMISSIONEDusing theupdateSystemendpoint.📘Billing noteFor most contracts, Systems are the units used for billing with fiskaly. A
Systembecomes relevant for billing once you change its state fromACQUIREDtoCOMMISSIONEDin the LIVE environment. Resources in the TEST environment are not billed. For the exact billing conditions, please refer to your contract with fiskaly.- A System will be connected to a specific, previously created Location of type
Create Record
For each business operation carried out in the System, the
createRecordendpoint must be called twice in sequence: first to record the intention to start a transaction, and then to provide the transaction data.Part A) Intention
A Record of type
INTENTIONcontains the association with the System that will carry out the transaction and an Operation of typeTRANSACTION, representing the System’s intent to record a transaction.Part B) Transaction
A Record of type
TRANSACTIONis associated with the previously createdINTENTIONand carries the transaction data, which is then signed and transmitted according to the taxpayer’s applicable regulation (Verifactu, SII, or TicketBAI).📘NoteAll Records created in the LIVE environment represent tax-relevant documents and must always reflect actual transactions. Use the designated TEST environment for integration testing.