Structure of Romanian eInvoice
There are two ways to create a Romanian eInvoice:
1. logincert.anaf.ro — IdP(Identity Provider) service that facilitates obtaining access tokens used to authorize access to API services. To achieve this, the user must be authenticated using qualified digital certificates.
2. api.anaf.ro — protected service that exposes APIs that require authorized access based on access tokens.
The scheme according to which the solution works is presented in the following figure:
In order to use the solution, it is necessary to be a registered user of the ANAF portal with a qualified digital certificate holding one of the SPV PJ rights (legal representative, appointed representative or authorized representative).
With third party application user is redirected to IdP, logincert.anaf.ro to get authentication and authorization token. Authentication is done using the qualified digital certificate of the user registered in the ANAF portal.
The API Registration link is accessed using the registration tab for developers on anaf.ro. If the user does not have an account in the ANAF Portal, he creates an account in the portal. After the necessary verification processes, access to the SPV (Virtual Private System) area in the ANAF portal is provided. There are two services offered on the portal: