Configure ANAF environment


When using the RO E-Factura Service or RO E-Transport Service, you may configure your app to send API requests either to ANAF’s production environment or test environment.

By default, a newly created app uses ANAF’s production environment. This means that any e-Factura invoices or e-Transport declarations that you upload to ANAF will be submitted to ANAF’s production API.

You may change the ANAF environment to test (or back to production) either from the graphical user interface of the SBS Console or from GraphQL. In either case, your user account (or the account access key, if you are doing this through the Account API) must have the permission to run the updateApp mutation of the Account API.

Web UI

To set your app’s ANAF environment for e-Factura or e-Transport:

  1. Sign in to the SBS Console.

  2. Click the WebUI tab.

  3. In the left-hand side navigation menu, click Applications.

  4. Click the application for which you would like to configure the ANAF environment.

  5. Under E-Factura (or E-Transport, as applicable), click Use Test Environment to switch to the test environment.

    ‘Set ANAF environment’

  6. In the confirmation dialog box that pops up, type TEST and click Agree to confirm.

GraphQL

To set your app’s ANAF environment for e-Factura or e-Transport:

  1. Sign in to the SBS Console.
  2. Click the GraphQL tab.
  3. Run the updateApp mutation and supply the value true or false value to the roAnafEfacturaUseTentEnvironment parameter, as required. For example, the mutation listed below configures the ANAF environment for both E-Factura and E-Transport to test:
mutation updateApp($id:ID!,$input:UpdateAppInput!) {
  updateApp(id:$id, input:$input) {
    id
    name
    roAnafEfacturaUseTestEnvironment
    roAnafEtransportUseTestEnvironment
  }
}
{
  "id": "YOUR_APPLICATION_ID",
  "input": {
    "roAnafEfacturaUseTestEnvironment": true,
    "roAnafEtransportUseTestEnvironment": true
  }
}

Viewing the ANAF environment at invoice level

The Invoice type of the RO E-Factura Service has a field called uploadedToTestEnvironment. This field indicates whether the invoice was uploaded to the ANAF test or production environment. The value is true if the invoice was uploaded to the ANAF test environment, false otherwise.