Receiving an invoice

Prerequisites

In order to receive invoice from your suppliers using the A-Cube platform, you should register our Recipient Code on the Italian tax authority's website.

Procedure:

  1. Access the Italian tax authority's website( https://ivaservizi.agenziaentrate.gov.it/portale/ ) and log in with your credentials.
  2. Click on the "Fatture e Corrispettivi" section.
  3. In the box "Fatturazione elettronica" click on "Registrazione delle modalità di ricezione della fattura elettronica".
  4. Select the Recipient Code (Codice Destinatario) option and enter the code we provided you with.
  5. Click on "Conferma".

Enabling the supplier invoice receiving

To enable the receiving of incoming invoices for a company you will need to enable supplier_invoice_enabled flag for the related BusinessRegistryConfiguration entry. This can be done either via API call PUT /business-registry-configurations/{id} or on the dashboard.

When an invoice with your recipient code (codice destinatario) is received, A-Cube API Platform will send it to your configured endpoint for the event supplier-invoice.

Payload structure

Copy
Copied
{
    "invoice": {
        "uuid": <Invoice UUID>,
        "filename": <Invoice SDI filename>,
        "created_at": <Creation date>,
        "payload": <Invoice JSON>
    }
}

The marking property of the invoice will be set at received in case everything went fine, or quarantena in case something went wrong acquiring the invoice (in this case the notice property will explain the problem happened).

What happens to P7M files?

When A-Cube receives a P7M signed file, the XML is extracted and made available via API. By the way you can retrieve the original file using the API call GET /invoices/{uuid} specifing the header Accept: application/octet-stream