Receive incoming invoices: configure webhooks, download documents and manage retention.
When an invoice for your organisation arrives via Peppol or another network, the PSB stores the document and sends a notification to your webhook. This article explains how to receive that notification, download the document and set up status management.
Receiving an invoice involves four steps:
InvoiceReceived webhook event to your endpointTo receive invoices, you need a webhook listening on the InvoiceReceived topic. Register it via the Hook API:
POST /api/v1/hook
{
"action": "https://mijn-systeem.nl/webhook/invoices#mijnSecretKey",
"topics": ["InvoiceReceived"]
}
As soon as an invoice arrives, your endpoint receives a POST request with a JSON payload. This payload includes the documentId and the partyId you need to retrieve the document.
Tip: Also set up a webhook on the
InvoiceReceivedErrortopic to receive notifications when something goes wrong during reception.
Use the documentId from the webhook payload to retrieve the invoice:
GET /api/v1/{partyId}/purchaseInvoice/{documentId}/download HTTP/1.1
Host: psb.econnect.eu
Authorization: Bearer {access_token}
The response contains the XML document (by default in the original format). Want to receive the document in a different format? Use the targetDocumentTypeId parameter:
GET /api/v1/{partyId}/purchaseInvoice/{documentId}/download?targetDocumentTypeId={URN}
The PSB automatically transforms the document to the specified format before returning it.
The PSB retains received documents according to this schedule:
We recommend retrieving documents immediately after reception and storing them in your own system. Do not rely on the PSB for long-term storage.
After processing, you can manually delete the document:
DELETE /api/v1/{partyId}/purchaseInvoice/{documentId} HTTP/1.1
Host: psb.econnect.eu
Authorization: Bearer {access_token}
This permanently deletes the document from the PSB. The audit trail remains available.
After reception, you can update the processing status of a purchase invoice. This is particularly relevant if you want to send Invoice Responses (status messages) to the sender. Read the article Send an Invoice Response for more information.
The PSB automatically sends an MLS message (Message Level Status) back to the sending party after receiving a document. This confirms that the document has been received and delivered. As an integrator you don't need to configure anything for this: the PSB handles this completely. If you send documents yourself, you receive MLS feedback via the webhook topic MessageLevelStatusReceived. See Configure webhooks for the configuration.
If you cannot configure webhooks (for example in an on-premise environment without inbound internet traffic), you can also retrieve invoices via polling:
GET /api/v1/{partyId}/purchaseInvoice HTTP/1.1
Host: psb.econnect.eu
Authorization: Bearer {access_token}
This endpoint returns a list of available purchase invoices. However, webhooks are always the preferred method due to real-time processing and lower load on the API.
Note: For on-premise integrations, also consider the reverse webhook (HTTPS inbound hook), which allows the PSB to push documents without your system needing to be directly reachable from the internet.
targetDocumentTypeId when downloading rather than converting yourself.Register a webhook on the topic InvoiceReceived; the payload includes documentId and partyId among other fields. With those values, call GET /api/v1/{partyId}/purchaseInvoice/{documentId}/download to retrieve the XML document. Optionally, you can use targetDocumentTypeId to receive a transformed format.
A received document that you have not yet downloaded remains available for up to 90 days. After download, it is kept for another 7 days; manual deletion removes the document immediately from the PSB. Store copies in your own system, as the PSB is not a long-term archive.
Yes, by polling via GET /api/v1/{partyId}/purchaseInvoice you get a list of available purchase invoices. Webhooks remain the preferred method for real-time processing and less load on the API; for on-premise setups without inbound internet, you can also consider a reverse webhook.
View the full PurchaseInvoice endpoints and response models at psb.econnect.eu.
Open the API reference