Skip to main content

Overview

The e-invoice.be API allows you to create invoices and credit notes that comply with the European e-invoicing standard (EN 16931) and transmit them via the Peppol network.

Before You Start

Use a sandbox company for development and testing. A sandbox company runs in test mode, so documents are emailed instead of being sent via Peppol, allowing you to safely test your integration. Create one from app.e-invoice.be and use its API key. Learn more about test mode →

Workflow

Creating and sending an e-invoice involves these steps:
  1. Validate your JSON invoice data (required during development)
  2. Create the document - only valid invoices can be created
  3. Send the document via Peppol (or email if test mode is enabled)
You must validate your invoice JSON before creating a document. The API only accepts invoices that can be converted into valid UBL BIS Billing 3.0 format. Use /api/validate/json during development to test your payload.

Step 1: Validate Your Invoice Data (Required)

Before creating an invoice, validate your JSON payload using POST /api/validate/json.

Validation Response

Success - Ready to create:
Validation errors:
Use /api/validate/json extensively during development. This endpoint does not create any documents - it only validates that your JSON can be converted to valid UBL format. See the Validation Guide for more details.

Step 2: Create the Invoice

Once validation passes, use the exact same JSON payload with POST /api/documents/.

Response

Understanding the Invoice Structure

Required Fields

Only the items array is strictly required. All other fields are optional but recommended for complete invoices:

Vendor (Supplier) Fields

Information about your company (the seller):
The vendor_tax_id is your company’s VAT or tax identification number (not the Peppol ID).
  • For Belgian companies: Use the full VAT number including ‘BE’ prefix (e.g., BE1018265814)
  • The API will automatically convert this to the appropriate Peppol ID format when transmitting via Peppol

Customer Fields

Information about your customer (the buyer):

Line Items

Each line item in the items array represents a product or service:
Required item fields:
  • At least description or unit_price should be provided for meaningful invoices
Common unit codes:
  • C62 - Units/pieces
  • HUR - Hours
  • DAY - Days
  • MTR - Meters
  • KGM - Kilograms
Tax rate format:
  • Must be a string representing a percentage
  • Examples: "21.00", "6.00", "0.00"
  • Standard Belgian VAT rates: "21.00" (standard), "6.00" (reduced), "0.00" (zero-rated)

Optional Fields

See the Advanced Invoicing Guide for more details.

Step 3: Send the Document

Once your invoice is created, send it to the recipient using POST /api/documents/{document_id}/send.

Response

Peppol ID Routing

By default, the sender and receiver Peppol IDs are automatically derived from the company identifiers in your document:
  • Derived from vendor_tax_id / customer_tax_id (VAT/tax number) OR vendor_id / customer_id (company registration number)
  • For Belgian companies: Tax ID BE1018265814 → Peppol ID 0208:1018265814
  • The 0208 scheme is mandatory for Belgian companies (required by Belgian government)
  • This automatic conversion happens regardless of any endpoint IDs in UBL documents
Belgian Peppol Requirement: All Belgian companies must use the 0208 scheme with their enterprise number (CBE). This is automatically handled when you provide a Belgian tax ID starting with BE.
Best Practice: Always explicitly specify sender and receiver Peppol IDs using query parameters to ensure documents are routed to the correct endpoints. While automatic derivation works in most cases, explicit routing prevents delivery failures and ensures full control over transmission.
To send to a specific Peppol endpoint, explicitly set the Peppol IDs using query parameters:
Available query parameters: Common Peppol schemes:
  • 0208 - Belgian enterprise number (BE)
  • 0088 - Global Location Number (GLN)
  • 0106 - Dutch KVK
Always verify the recipient is registered at the specified Peppol endpoint before sending. Use /api/validate/peppol-id?peppol_id=scheme:identifier to confirm registration and prevent delivery failures.

What Happens Next?

The behavior depends on whether test mode is enabled: Test mode disabled (production):
  • Document is transmitted via the Peppol network
  • Recipient receives it in their official e-invoicing system
  • Delivery confirmed via Access Point acknowledgments
Test mode enabled (testing):
  • Document is converted to UBL XML
  • UBL XML is sent via email to the address configured for your account
  • No actual Peppol transmission occurs
  • Perfect for testing without affecting real recipients
Test mode is delivered through a sandbox company. Create one from app.e-invoice.be for development, and use a separate regular company when you’re ready to go live.

Document States

Outbound document state flow
Automatic Retries: Documents in TRANSIT use an exponential backoff strategy with 10 retry attempts before transitioning to FAILED. Retry delays are: 1, 2, 4, 8, 16, 32, 64, 128, 256, and 360 minutes (final retry capped at 6 hours). This maximizes delivery success during temporary network issues.Manual Retry: If a document reaches FAILED state, you can retry delivery by calling POST /api/documents/{document_id}/send again, which will transition it back to TRANSIT for another delivery attempt.Track delivery status using webhooks or by polling GET /api/documents/{document_id}Coming soon: Detailed transmission attempt history will be available in a future release, showing all retry attempts with timestamps and failure reasons.

Complete Example

Here’s a complete Node.js example:
If test mode is enabled on your account, this will email the UBL XML. If test mode is disabled, it will send via Peppol. Your code doesn’t need to change - just the test mode setting on your account.

Working with Credit Notes

Credit notes follow the same structure, but set document_type: "CREDIT_NOTE":

Next Steps

Validation Guide

Test invoices during development

Lookup Participants

Find customer Peppol IDs

Set Up Webhooks

Get delivery notifications

API Reference

Explore all endpoints