to select ↑↓ to navigate
eInvoicing

eInvoicing

Open in ChatGPT
Ask ChatGPT about this page
Open in Claude
Ask Claude about this page

Sending an Invoice

Sending an Invoice

The day-to-day flow for generating a PEPPOL e-document from a Sales Invoice. Connection to the PEPPOL network is handled by a service provider; this page covers the EDocument side.

Prerequisites

  • Code lists imported (see Getting Started)
  • Company has Electronic Address Scheme + Electronic Address
  • Customer has Electronic Address Scheme + Electronic Address (or a fallback email)
  • For each invoice item: a UOM mapped to UN/ECE Rec 20, a tax setup that resolves to a UNCL 5305 code

Step 1 — Create the Sales Invoice

Create your Sales Invoice as usual. The EDocument Profile defaults from the Customer if set; otherwise, set it on the invoice manually. The Customer Purchase Order field is mapped to BuyerReference in the PEPPOL XML — required by many customer accounts-payable systems.

Step 2 — EDocument creation

Depending on the profile's Sales Invoice Settings:

  • On Save: EDocument record is created when the draft is saved — useful for previewing before submit.
  • On Submit (production default): EDocument record is created automatically on submit. If validation fails, submission is blocked.

You can also create an EDocument manually:

  1. EDocument → New
  2. Source Type: "Sales Invoice"
  3. Source Document: the Sales Invoice name
  4. EDocument Profile: "PEPPOL"

Step 3 — Generate XML

On the EDocument record, click Generate XML. The app:

  1. Builds UBL 2.1 XML from the source invoice
  2. Validates the XML against the XSD schema
  3. Validates business rules using PEPPOL Schematron
  4. Attaches the XML file to the EDocument

If validation fails, the EDocument status becomes "Validation Failed" and the error is shown. Common causes:

  • XSD schema violations — element order, missing required fields
  • Schematron business rule violations (BR-CO-15, BR-CO-17, …)
  • Missing required codes (no UNCL 5305 mapped) or invalid values

Step 4 — Preview

Click Preview EDocument to view the rendered HTML. The preview uses XSLT to transform the UBL XML into a human-readable invoice, useful for verifying content before transmission.

Step 5 — Transmit

With a service provider configured, click Transmit via API. The integration app handles the network handoff and updates the EDocument with a transmission ID and tracking reference.

Fields included in the XML

Category Fields
Header Invoice type, number, date, due date (invoices only), currency, BuyerReference
Parties Company / Customer name, address, tax ID, electronic address
Lines Item name, description, quantity, rate, net amount, tax rate per line
Taxes Rate, amount, taxable amount, exemption codes
Payment Bank account (IBAN + BIC), payment terms
Totals Line extension amount, tax exclusive, tax inclusive, payable amount
Allowances Document-level discounts and allowances

Credit Notes

Set is_return = 1 on the Sales Invoice. The app automatically:

  • Uses CreditNote root XML element instead of Invoice
  • Uses CreditNoteTypeCode instead of InvoiceTypeCode
  • Uses CreditNoteLine instead of InvoiceLine
  • Excludes DueDate (credit notes don't have one)
  • Includes BillingReference pointing at the original invoice
  • Validates against the CreditNote XSD

External validation

For extra safety before going live, the PEPPOL Validation Service accepts any UBL 2.1 file and runs the official rules. Your service provider's dashboard typically does this too.

Last updated 4 days ago
Was this helpful?
Thanks!