Peppol Billit for WHMCS Print

  • 0

What It Does

Send invoices and credit notes to Belgian B2B customers via Peppol e-invoicing network using Billit.be as access point. Compliant with Belgian B2B e-invoicing mandate (January 1, 2026).

Features

  • Automatic Peppol delivery when Belgian B2B clients pay
  • Credit notes sent via Peppol on refund
  • Invoices arrive directly in client's accounting software (no PDF emails)
  • Only triggers for eligible clients (Belgium + valid BE VAT number)
  • Real-time delivery status via webhooks
  • Client area shows Peppol delivery status
  • Optional PDF attachment alongside UBL data

Requirements

  • WHMCS 8.9+
  • PHP 7.4+
  • Billit.be account with API access
  • Valid Billit.be API key

Installation

  1. Upload files to /modules/addons/peppol_billit/
  2. Go to Setup → Addon Modules
  3. Activate "Peppol Billit"
  4. Enter your license key
  5. Enter your Billit API key
  6. Test connection

Done. Eligible invoices now send via Peppol automatically.

How It Works

Invoices

  1. Belgian B2B client pays invoice
  2. Module checks eligibility (BE country + BE VAT number)
  3. Invoice sent to Billit API
  4. Billit converts to UBL and sends via Peppol
  5. Client receives invoice in their accounting software

Credit Notes

  1. Invoice gets refunded
  2. Module sends credit note via Peppol
  3. Client receives credit note in their accounting software

No PDF attachments, no manual processing.

Eligibility

Module only processes clients who are:

  • Located in Belgium (country = BE)
  • Have valid Belgian VAT number (BE + 10 digits)

All other clients continue receiving normal invoice emails.

Configuration

Billit API Key: Your API key from Billit

Test Mode: Use Billit sandbox for testing

Default VAT %: VAT percentage for invoice lines (default: 21)

Send Trigger: When to send invoices to Peppol

  • "Send on Invoice Payment" (default): Pro-forma workflow — sends when invoice is paid
  • "Send on Invoice Creation": Non pro-forma workflow — sends when invoice is created

Email Behavior: How to handle emails for Peppol clients (see below)

Webhook Secret: Secret key for verifying Billit webhook signatures

Attach Invoice PDF: Include WHMCS invoice PDF as attachment in Peppol e-invoice

Email Behavior

Four options:

  • None (default): No emails for Peppol clients. Invoice delivered via Peppol only.
  • Replace: Suppress default WHMCS emails. Send "Peppol Invoice Delivered" confirmation instead.
  • Keep: Send both default WHMCS emails AND Peppol confirmation.
  • WHMCS Default Only: Send only standard WHMCS email. No Peppol confirmation.

Email Templates

Module creates two email templates on activation:

  • "Peppol Invoice Delivered"
  • "Peppol Credit Note Delivered"

Customize in Setup → Email Templates → Invoice.

Webhook Setup

To receive real-time delivery status updates from Billit, register a webhook.

Register the webhook:

curl --request POST \
     --url https://api.billit.be/v1/webhooks \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'apiKey: YOUR_BILLIT_API_KEY' \
     --data '{"EntityType": "Message", "EntityUpdateType": "U", "WebhookURL": "https://YOUR_WHMCS_URL/modules/addons/peppol_billit/webhook.php"}'

Response example:

{
  "WebhookID": 56044,
  "EntityType": "Message",
  "EntityUpdateType": "U",
  "WebhookURL": "https://YOUR_WHMCS_URL/modules/addons/peppol_billit/webhook.php",
  "Secret": "your-secret-key-here"
}

Save the secret:

Copy the Secret from the response and paste it in module settings under Webhook Secret.

Status Flow

pending → sent → accepted → delivered
                    ↓
                 refused
  • Sent: Invoice queued and validated by Billit
  • Accepted: Peppol network acknowledged receipt
  • Delivered: Customer received the invoice (final state)
  • Refused: Customer or system rejected the invoice

Admin Features

  • Connection test button
  • Statistics (sent, pending, failed)
  • Separate tabs for Invoices and Credit Notes
  • Filter by status
  • Retry failed deliveries
  • View delivery details

Client Features

  • "Peppol E-Invoices" link in Billing menu (eligible clients only)
  • List of all Peppol documents
  • Type badges (Invoice / Credit Note)
  • Delivery status
  • Links to original invoices

What is Peppol?

Peppol is the Pan-European Public Procurement Online network. It allows businesses to exchange electronic documents (invoices, credit notes, orders) directly between accounting systems.

Belgium mandates B2B e-invoicing via Peppol from January 1, 2026.

When you send via Peppol:

  • No PDF emails needed
  • Invoice goes directly into client's accounting software
  • Structured data (UBL format)
  • Automatic processing possible
  • Legal compliance

Language Support

Included translations:

  • English
  • Dutch
  • French

Add more by creating lang/[language].php following the existing format.

Troubleshooting

Connection test fails:

  • Check API key is correct
  • Check Test Mode matches your API key type (sandbox vs production)
  • Review WHMCS activity log

Invoice not sending:

  • Check client is Belgian (country = BE)
  • Check client has valid VAT number (BE + 10 digits in tax_id field)
  • Check invoice is actually paid (or created, depending on Send Trigger setting)
  • Review activity log for errors

Client not seeing Peppol menu:

  • They must be eligible (Belgian B2B)
  • Clear template cache

Credit note not sending:

  • Invoice must be in "Refunded" status
  • Check activity log for errors

Security

  • Client area validates ownership
  • All files check WHMCS constant
  • SQL injection protected (Capsule ORM)
  • API key stored securely in WHMCS config
  • HTTPS only for API calls

Database

Creates one table: mod_peppol_sent

Stores invoice ID, type (invoice/credit_note), client info, Peppol ID, Billit Order ID, status, response data, and timestamps.

Billit.be API

Module uses the Billit.be API:

  • GET /v1/account/accountInformation — connection test
  • POST /v1/peppol/sendOrder — send invoice/credit note

API Documentation: docs.billit.be

Authentication: apiKey header (not Bearer token).

Changelog

v1.6

  • Added: 4th email behavior option "WHMCS default email only"
  • Fixed: Retry button now properly updates error message in database

v1.5

  • Fixed: Error messages no longer show "Array"
  • Added: Dynamic Peppol participant ID lookup via Billit API
  • Changed: Email behavior default is now "None"

v1.4

  • Added: Optional PDF attachment for Peppol invoices

v1.3

  • Added: Payment status sync to Billit for "on_creation" workflow

v1.2

  • Fixed: EmailPreSend hook now only processes invoice-type emails

v1.1

  • Added "Send Trigger" configuration option
  • Send on payment (default) or send on creation

v1.0

  • Initial release

License

Licensed per WHMCS installation.

Purchase: Peppol Billit for WHMCS


Was this answer helpful?

« Back

WHOIS Information

×
Loading WHOIS information...