Skip to main content

Overview

e-invoice.be provides two API hosts and an optional test mode to support different development and production scenarios. Understanding these options is crucial for safe development and testing.

API Hosts

Production API: api.e-invoice.be

Base URL: https://api.e-invoice.be This is the primary production environment that you should use for all normal operations:
  • Real Peppol network transmission
  • Standard rate limits for production use
  • Stable, tested features only
  • Use this for live business transactions

Development API: api-dev.e-invoice.be

Base URL: https://api-dev.e-invoice.be This environment is designed for specific testing scenarios:
  • Testing new features before general release
  • Custom customer-specific features under development
  • Load testing with different rate limits
  • Experimentation without impacting production
The development API (api-dev.e-invoice.be) is not for general testing or development. It’s specifically for testing new features, custom implementations, and load testing. For normal development and testing, use test mode on the production API instead.

Test Mode

Test mode is a special operating mode available on both api.e-invoice.be and api-dev.e-invoice.be that prevents real interactions with the Peppol network.

When Test Mode is Enabled

  • Documents are not sent via the Peppol network
  • Instead, an email is sent with the UBL XML that would have been transmitted
  • Admin API tenant registrations simulate the registration without actually registering on Peppol
  • All other API functionality works normally

Key Points About Test Mode

  • Test mode ≠ api-dev.e-invoice.be (they are independent concepts)
  • New companies are not automatically in test mode
  • Test mode must be explicitly requested
  • Works on both production and development API hosts
To enable test mode for your account, send an email to [email protected] with your account details and the reason for needing test mode.

Which Should You Use?

Normal Development & Testing

Production API (api.e-invoice.be) with test mode enabledPerfect for developing your integration without affecting the Peppol network.

Production Transactions

Production API (api.e-invoice.be) with test mode disabledFor real business transactions sent via Peppol.

Load Testing

Development API (api-dev.e-invoice.be)Test performance under load with adjusted rate limits.

Beta Features

Development API (api-dev.e-invoice.be)Access and test new features before general release.

Environment Comparison

FeatureProduction APIDevelopment APITest Mode (either API)
Base URLhttps://api.e-invoice.behttps://api-dev.e-invoice.be(Same as host API)
PurposeLive transactions & normal testingBeta features & load testingPrevent Peppol transmission
Peppol transmission✅ Yes (unless test mode on)✅ Yes (unless test mode on)❌ Email delivery only
FeaturesStable releaseLatest features (may be unstable)(Same as host API)
Rate limitsStandardConfigurable for load testing(Same as host API)
Who should useEveryoneSpecific use cases onlyDevelopers & testers

Test Mode Details

How Test Mode Works

When test mode is enabled on your account:
  1. Document creation: Works exactly the same as normal
  2. Document sending: Instead of Peppol transmission:
    • Document is validated and converted to UBL XML
    • State transitions: DRAFTTRANSITSENT
    • UBL XML is attached to an email
    • Email is sent to the address configured for your account
    • No actual Peppol transmission occurs
  3. All other functionality: Operates normally (webhooks, API endpoints, etc.)

When to Use Test Mode

  • Development: Building and testing your integration
  • Training: Demonstrating the platform without affecting Peppol
  • Validation: Testing invoice data and UBL generation
  • Staging deploys: QA environments that should mirror production behavior

When NOT to Use Test Mode

  • Production: Live business transactions must have test mode disabled
  • Real invoices: Any invoice that needs to reach a recipient via Peppol

Shared Database and Credentials

Both API hosts (api.e-invoice.be and api-dev.e-invoice.be) share the same:
  • Database: Your account, documents, and settings are synchronized
  • API credentials: The same API key works on both hosts
  • Account information: Registration, Peppol ID, and configuration are identical
  • Test mode setting: Test mode applies to both hosts when enabled
This means you can seamlessly switch between API hosts using the same credentials.

Switching Between API Hosts

Switching between API hosts requires only changing the base URL. Your API key remains the same.

Example: Node.js

// Most users should use production API
const BASE_URL = 'https://api.e-invoice.be';

// Only use development API for specific scenarios
// const BASE_URL = 'https://api-dev.e-invoice.be';

const api = axios.create({
  baseURL: BASE_URL,
  headers: {
    'Authorization': `Bearer ${process.env.E_INVOICE_API_KEY}`,
    'Content-Type': 'application/json'
  }
});

Example: Python

import os

# Most users should use production API
BASE_URL = 'https://api.e-invoice.be'

# Only use development API for specific scenarios
# BASE_URL = 'https://api-dev.e-invoice.be'

headers = {
    'Authorization': f'Bearer {os.getenv("E_INVOICE_API_KEY")}',
    'Content-Type': 'application/json'
}

Example: curl

# Production API (recommended for most users)
curl -X GET "https://api.e-invoice.be/api/me/" \
     -H "Authorization: Bearer YOUR_API_KEY"

# Development API (only for beta features/load testing)
curl -X GET "https://api-dev.e-invoice.be/api/me/" \
     -H "Authorization: Bearer YOUR_API_KEY"

Best Practices

  1. Use Production API with Test Mode
    • Request test mode to be enabled on your account
    • Develop and test all integration code on api.e-invoice.be
    • Test mode prevents Peppol transmission but validates everything else
  2. Validate Thoroughly
    • Use /api/validate/json extensively during development
    • Test with multiple invoice scenarios
    • Verify calculations, tax rates, and totals
  3. Test End-to-End
    • Create documents and verify email delivery of UBL XML in test mode
    • Import received UBL into accounting software to confirm compatibility
    • Test webhooks and error handling
  4. Disable Test Mode for Production
    • Contact [email protected] to disable test mode
    • Start with a small volume of real invoices
    • Monitor for any issues during initial rollout

Configuration Management

Use environment variables for API configuration:
# .env
E_INVOICE_API_KEY=your_api_key
E_INVOICE_BASE_URL=https://api.e-invoice.be
Most users should always use https://api.e-invoice.be. Only use the development API if you have specific needs for beta features or load testing.

Testing Received Documents

To test incoming documents (inbox functionality):
  1. Enable test mode on your account
  2. Create a document with your own company as the recipient
  3. Send the document (it will be emailed, not sent via Peppol)
  4. Check your inbox via GET /api/inbox/
  5. Test accept/reject workflows with POST /api/inbox/{id}/accept
This allows you to test the complete receive-side integration without needing a second Peppol participant.

Frequently Asked Questions

Do I need test mode?

Yes, if you’re developing an integration. Test mode allows you to test your integration without sending real documents via Peppol. Request it from [email protected] when you start development.

Which API host should I use?

Use api.e-invoice.be (production API). The development API is only for specific scenarios like beta features or load testing. Most users, including those in development, should use the production API with test mode enabled.

What’s the difference between test mode and the development API?

  • Test mode: A setting on your account that prevents Peppol transmission (available on both API hosts)
  • Development API (api-dev.e-invoice.be): A separate API host with experimental features and configurable rate limits
They are independent - you can have test mode enabled while using either API host.

Can I use different API keys for different environments?

The same API key works on both api.e-invoice.be and api-dev.e-invoice.be since they share the same database. You can create multiple API keys to isolate different applications if needed.

How do I switch from testing to production?

Contact [email protected] to disable test mode on your account. Your code doesn’t need to change - just disable test mode and documents will be sent via Peppol instead of email.

Can I test webhooks with test mode?

Yes, webhooks work identically with test mode enabled or disabled. You’ll receive webhook events for document state changes, including when documents are “sent” (via email when test mode is on, via Peppol when off).

Next Steps