Skip to main content
This page takes you from a new account to a sent invoice. You use a sandbox company, which runs in test mode: the API does not transmit the document on the Peppol network, but sends the generated UBL XML to you by email. You need:
  • An account at app.e-invoice.be.
  • A terminal with curl (or Node.js 18+, Python with requests, PHP with the cURL extension, or .NET 6+).
A sandbox company needs no VAT verification, no contact verification and no payment. It is free to use. See Test mode and sandbox companies for the details of test mode.
1

Create an account

Sign up at app.e-invoice.be and log in.
2

Create a sandbox company

  1. Open Companies and select Create sandbox company.
  2. Keep the country Belgium and select Suggest valid VAT to get a synthetic Belgian VAT number.
  3. Make sure that Contact email is an address that you can read. The API sends the test document to this address.
  4. Create the company, open API Settings and copy the API key of the sandbox company.
Each company has its own API key. Use the key of the sandbox company for all commands on this page.
3

Check the API key

Request the details of the company that owns the key.
The API returns 200 OK:
The vendor of each document that you create must be a Peppol ID of your company. For a Belgian company, the Peppol ID is 0208: followed by the VAT number without the BE prefix. Take the number after 0208: in peppol_ids, put BE in front of it and keep it in a second environment variable:
If the vendor VAT number does not match a Peppol ID of your company, POST /api/documents/ returns 406 with the message Derived sender '0208:...' is not in tenant peppol_ids.
4

Write the invoice

Save the invoice as invoice.json. The command puts your vendor VAT number in the file. The customer is OpenPeppol VZW (BE0848934496).
5

Validate the invoice

Validation is not a separate mandatory call. POST /api/documents/ rejects a payload that does not pass the same rules. Use POST /api/validate/json while you develop, because it returns all rule failures and the generated UBL.
The API returns 201 Created. This call does not store a document. The ubl_document field contains the full UBL XML; it is shortened here.
If is_valid is false, read the issues array, correct invoice.json and validate again. See Validation during development.
6

Create the document

Send the same file to POST /api/documents/. The API stores the document in the state DRAFT.
The API returns 201 Created with the complete document. The response is shortened here.
Keep the id for the next step:
7

Send the document

Send the draft. The request has no body.
The API returns 200 OK with the document. The state is now TRANSIT, because delivery runs in the background. The response is shortened here.
If the sandbox company has no contact email address, this call returns 400 with the message Tenant is in test mode but no company email is set. Add a contact email address in the company settings, then create and send a new document.
8

Check the result

Open the mailbox of the contact email address of the sandbox company. You get an email with the subject Document sent via Peppol // e-invoice.be [TEST-MODE] and the UBL XML as an attachment. This is the file that a production company transmits on the Peppol network.When the email is sent, the state of the document changes to SENT:
The API also sends a document.sent event to each webhook that subscribes to it. See Webhooks.

Go live

Test mode is fixed when a company is created. To send documents on the Peppol network, create a production company and use its API key. The API host and your code stay the same. Follow the go-live checklist before you send the first production document. If you prefer a typed client, see SDKs. If you prefer a terminal, see the peppol CLI.

Next Steps

Go-live checklist

Move from a sandbox company to a production company

Test mode and sandbox companies

Learn how test mode and sandbox companies work

Create e-invoices

Use all invoice fields, payment details and tax options

Webhooks

Get a notification for each sent and received document