Invoice delivery channel
Outgoing invoices are delivered via the Peppol network or via email. You don't choose the channel explicitly: it is derived from the identifier of the recipient in the invoice XML.
| Recipient identifier | Delivery channel |
|---|---|
Peppol participant ID (e.g. schemeID="9930") | Peppol |
Email address (schemeID="EM") | |
| None of the above | Rejected |
The channel is decided by the recipient's electronic address (ram:URIUniversalCommunication in CII syntax,
cbc:EndpointID in UBL syntax).
Peppol
Before sending, we check that the recipient is registered on Peppol and accepts the invoice format. If not, the upload is rejected.
Once the invoice has been handed over to the Peppol network, its status becomes sent and the invoice.sent
webhook is triggered. sent is currently the final status for Peppol invoices. The delivered and delivery_error statuses are only used for email.
Email
Use email to reach recipients that are not on Peppol.
Recipient
Set the recipient's electronic address to their email address with schemeID="EM".
CII
<ram:BuyerTradeParty>
<ram:Name>Kunden AG Mitte</ram:Name>
<!-- ... -->
<ram:URIUniversalCommunication>
<ram:URIID schemeID="EM">invoices@kunden-ag.de</ram:URIID>
</ram:URIUniversalCommunication>
</ram:BuyerTradeParty>
UBL
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="EM">invoices@kunden-ag.de</cbc:EndpointID>
<!-- ... -->
</cac:Party>
</cac:AccountingCustomerParty>
Sender
For email delivery the invoice is assigned to your Legal Entity by VAT ID, so the seller must carry the same German
VAT ID registered on your Legal Entity (e.g. ram:SpecifiedTaxRegistration/ram:ID schemeID="VA" in CII syntax,
cac:PartyTaxScheme/cbc:CompanyID in UBL syntax).
If the seller's electronic address is an email address and no valid VAT ID is found, the upload is rejected.
What the recipient gets
Both ZUGFeRD and XRechnung invoices can be sent by email. The email contains two attachments:
- the original invoice XML you uploaded
- a PDF rendering of the invoice, generated by A-Cube
For invoices using the EN 16931 profile, the PDF is a hybrid PDF/A-3 with the invoice embedded as CII XML. The same PDF and HTML renderings are available via the print endpoint.
The email is sent from an A-Cube address with a standard subject and body. Customizing the sender address, subject and body per Legal Entity is not available through the API; contact us if you need it.
Delivery tracking
An email invoice moves through the usual statuses:
sending_queued: the email is waiting to be sentsent: the email was accepted by the mail server, and theinvoice.sentwebhook is sent. If the mail server does not accept the email, the status becomessent_errorand theinvoice.failedwebhook is sent instead- A-Cube then waits for the final delivery result and moves the invoice to one of these statuses:
delivered: the email reached the recipient's mail server, and theinvoice.deliveredwebhook is sentdelivery_error: the email bounced or the recipient reported it as spam, and theinvoice.delivery_failedwebhook is sent
So sent means "handed over for delivery", not "in the recipient's inbox". Keep listening for
invoice.delivered or invoice.delivery_failed after invoice.sent.
When delivery fails, the status is delivery_error and lastError on the invoice explains why:
lastError | What to do |
|---|---|
| Email rejected - check recipient address and mailbox | Permanent bounce: the address doesn't exist or refuses mail. Fix it and upload the invoice again |
| Temporary email delivery failure | Transient bounce. Upload the invoice again later |
| Recipient mailbox full | Ask the recipient to free space, then upload the invoice again |
| Email complaint reported - confirm recipient consent | The recipient marked the email as spam |
| Email delivery failed - check recipient address | Other delivery failure |