Skip to main content

Generate e-invoice files for billing documents

Zuora

Generate e-invoice files for billing documents

The e-invoicing process is triggered automatically when billing documents are posted. During the process, the billing documents are submitted to a third-party e-invoicing service provider to generate e-invoice files if the following conditions are met:

  • The account must be configured to generate e-invoice files for billing documents.
  • The billing documents must be in Posted status.
  • A business region must be created for the billing country contact, and be linked to an e-invoicing service provider.

You can also use the following REST API operations to trigger the generation of e-invoice files for billing documents, including invoices, credit memos, and debit memos:

  • Generate an e-invoice file for an invoice
  • Generate an e-invoice file for a credit memo
  • Generate an e-invoice file for a debit memo

Generate e-invoice files for billing documents through the Zuora UI

To trigger the generation of e-invoice files for invoices through the Zuora UI, perform the following steps:

  1. In the left navigation section, navigate to Billing > Invoices.
  2. On the Invoices page, click the number of the invoice that you want to generate an e-invoice file for.
  3. On the invoice details page, click the more options icon, and then click Regenerate E-Invoice.

An e-invoice file is generated for the invoice. The procedure for generating e-invoice files for credit memos or debit memos is similar to the preceding procedure.

View e-invoice file status and error information through the Zuora UI

After the generation of e-invoice files for invoices is triggered, you can view e-invoice file status and error information about a billing document through the Zuora UI. 

To view e-invoicing data about an invoice through the Zuora UI, perform the following steps:

  1. In the left navigation section, navigate to Billing > Invoices.
  2. On the Invoices page, click the number of the invoice that you want to view e-invoicing data about.
  3. On the invoice details page, view the information displayed below the E-Invoice Status field in the Basic Information section.
    • If an e-invoice file is successfully generated for the invoice, Success is displayed as the status value of this field.
    • If the e-invoice file generation conditionally succeeds and an e-invoice file is generated, Conditional Success is displayed as the status value of this field. The Conditional Success status is activated when the Tax Authority sends back a SCI response code of Conditionally Accepted (CA).
    • If a failure occurs during e-invoice file generation, the corresponding error code and an error message are also displayed as the value of this field. You can access detailed error codes and error messages through the Zuora UI.
    • If an e-invoice file is approved by the tax authority, but may still require further validation by the end customer, the Approved by Authority status is displayed as the status value of this field. The next status will be either Success or Rejected.
    • If the end customer explicitly rejects an e-invoice file, the Rejected status is displayed as the status value of this field. You cannot resend a rejected e-invoice; you must create a new invoice instead.
  4. If you want to learn more log information, click the Download Logs link below the E-Invoice Status field to download the e-invoicing log file.

The procedure for viewing e-invoice file status and error message information about credit memos or debit memos is similar to the preceding procedure.

The following table lists the common error codes, error messages, and the corresponding resolutions.

E-Invoice Status Error code Error message Resolution
Fail ConfigurationError
  • The E-Invoice service provider is not configured in E-Invoice settings, please check your settings.
  • The E-Invoice business region is not configured for the country {0} in E-Invoice settings, please check your settings.
  • The billing document cannot be processed as the country is not specified in the billing information.
  • Service provider is not supported.
  • Can not find E-Invoice template for the service provider Sovos in the country IN for CreditMemo.
Modify the corresponding e-invoicing configurations.
IntegrationError
  • Failed: IntegrationError - request URL /api/v1/workflows/396483/run failed
  • Failed to render Sovos Business Document
Download the transaction log through the Zuora UI and contact Zuora Global Support with the transaction log.
ServiceProviderError Internal error Contact Zuora Global Support or the corresponding service provider.

Vendor-specific error codes

Examples:

  • document.documentDataInvalid
  • invalidParameter
  • IRN cannot be generated for the document date which is prior to 1st October 2020
  • There was an error validating the transformation 'SCI_to_GST' with error 'The 'http://www.trustweaver.com/gst/json:AssVal' element is invalid 
Verify your data or the e-invoice file templates.
Conditional Success

Vendor-specific error codes

Example:

  • XSD_ZATCA_VALID
200: Conditionally authorized by the tax authority. XSD_ZATCA_VALID: Complied with UBL 2.1 standards in line with ZATCA specifications. BR-S-08: [BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ' Standard rated' the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are 'Standard Rate' Check the rules defined for UBL document in https://docs.peppol.eu/poacc/billing/3.0/2024-Q2/rules/ubl-tc434/BR-S-08/ and adjust the E-Invoice template accordingly so that it meets the standard.

E-Invoice statuses

This section provides an overview of the different statuses associated with an e-invoice, what each status means, and how these statuses transition throughout the invoice lifecycle. A flowchart is also included to illustrate possible transitions and response flows.

Blank diagram (3).png

The E-Invoice Status field reflects the current state of the e-invoicing process for a given invoice. Below are the possible statuses and their meanings:

  • Processing - Indicates that the e-invoice process has started. This is typically the initial status before file generation or submission to the tax authority.
  • Generated - Indicates that the e-invoice file was successfully generated. At this point, the eInvoiceField contains the ID of the generated e-invoice file. This is applicable only when you use PEPPOL as your service provider. See E-Invoicing with PEPPOL.
  • Failed - Indicates that an error occurred during the e-invoice file generation process. In this case, the status is set to Failed.
  • ConditionalSuccess - The e-invoice file generation completed with warnings or partial success. This status is applicable only when using Sovos.
  • ApprovedByAuthority - The e-invoice has been approved by the tax authority but may still require further validation by the end customer. The invoice will eventually transition to either Success or Rejected, depending on the final decision from the customer or downstream system. In most cases, except for Italy, the Approved by Authority status is skipped, as Sovos returns the final status (Success or Failed) in the same response. As a result, the status moves directly to Success or Failed. This status is applicable only when using Sovos.
  • Rejected - The e-invoice has been explicitly rejected by the end customer. You cannot resend a rejected e-invoice and to proceed, you must generate and submit a new invoice. This status is applicable only when using Sovos.
  • Success - The e-invoice has been successfully submitted and accepted by the tax authority and/or end customer. This is the final status for completed and approved invoices.

All these statuses apply to all e-invoicing countries; however, in most regions, except Italy, the Approved by Authority status is typically skipped, as Sovos returns the final status (either Success or Failed) immediately.

Resync e-invoice status

 Zuora also provides an API called Resync E-Invoice Status, which allows external systems to query and update invoice statuses, particularly for documents marked as Approved by Authority. The API must be used to automate this process, as the UI only supports status resync for a single invoice at a time. 

Additionally, the Resync E-Invoice Status API or UI action can be triggered for documents in either the Approved by Authority or Processing status and supports Invoices, Credit Memos, and Debit Memos. For Italy, it may take up to 25 days to receive the final Success or Rejected status after the Approved by Authority stage, due to extended processing timelines by the tax authority and end customer.

Regenerate e-invoices

The Regenerate E-Invoice action is available for documents in a Failed status and supports Invoices, Credit Memos, and Debit Memos.  Once you fix the errors and trigger the regeneration, the document will be resubmitted to the e-invoicing service provider, and its status will update to Processing.