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
Enable test mode for development and testing. When test mode is enabled, documents are emailed instead of being sent via Peppol, allowing you to safely test your integration. Contact [email protected] to enable test mode. Learn more about test mode →
Workflow
Creating and sending an e-invoice involves these steps:- Validate your JSON invoice data (required during development)
- Create the document - only valid invoices can be created
- Send the document via Peppol (or email if test mode is enabled)
Step 1: Validate Your Invoice Data (Required)
Before creating an invoice, validate your JSON payload usingPOST /api/validate/json.
Validation Response
Success - Ready to create:Step 2: Create the Invoice
Once validation passes, use the exact same JSON payload withPOST /api/documents/.
Response
Understanding the Invoice Structure
Required Fields
Only theitems array is strictly required. All other fields are optional but recommended for complete invoices:
| Field | Description | Required |
|---|---|---|
items | Array of invoice line items | Yes (min 1) |
document_type | Document type: INVOICE, CREDIT_NOTE, or DEBIT_NOTE | No (default: INVOICE) |
invoice_id | Your unique invoice number | Recommended |
invoice_date | Invoice date (ISO 8601: YYYY-MM-DD) | Recommended |
currency | Currency code (e.g., EUR, USD, GBP) | No (default: EUR) |
Vendor (Supplier) Fields
Information about your company (the seller):| Field | Description | Example |
|---|---|---|
vendor_name | Your company name | "E-INVOICE BV" |
vendor_tax_id | Your VAT/Tax ID | "BE1018265814" |
vendor_address | Your full address | "Brusselsesteenweg 119/A, 1980 Zemst, Belgium" |
vendor_email | Your contact email | "[email protected]" |
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):| Field | Description | Example |
|---|---|---|
customer_name | Customer company name | "OpenPeppol VZW" |
customer_tax_id | Customer VAT/Tax ID | "BE0848934496" |
customer_address | Customer full address | "Robert Schumainplein 6 bus 5, 1040 Brussel, Belgium" |
customer_email | Customer contact email | "[email protected]" |
Line Items
Each line item in theitems array represents a product or service:
- At least
descriptionorunit_priceshould be provided for meaningful invoices
C62- Units/piecesHUR- HoursDAY- DaysMTR- MetersKGM- Kilograms
- 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
Payment Details
Payment Details
Additional Addresses
Additional Addresses
Allowances & Charges
Allowances & Charges
References and Notes
References and Notes
Step 3: Send the Document
Once your invoice is created, send it to the recipient usingPOST /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) ORvendor_id/customer_id(company registration number) - For Belgian companies: Tax ID
BE1018265814→ Peppol ID0208:1018265814 - The
0208scheme 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.Explicitly Specifying Peppol IDs (Recommended)
To send to a specific Peppol endpoint, explicitly set the Peppol IDs using query parameters:| Parameter | Description | Example |
|---|---|---|
sender_peppol_scheme | Sender’s Peppol scheme ID | 0208 |
sender_peppol_id | Sender’s Peppol identifier | 1018265814 |
receiver_peppol_scheme | Receiver’s Peppol scheme ID | 0088 |
receiver_peppol_id | Receiver’s Peppol identifier | 1234567890123 |
0208- Belgian enterprise number (BE)0088- Global Location Number (GLN)0106- Dutch KVK
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
- 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 a setting on your account. Contact [email protected] to enable test mode for development or disable it when you’re ready to go live.
Document States
| State | Description |
|---|---|
DRAFT | Created but not sent |
TRANSIT | Being transmitted (Peppol or email) |
SENT | Successfully delivered to recipient |
FAILED | Transmission failed |
RECEIVED | Received from another party |

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 setdocument_type: "CREDIT_NOTE":