Document flow and status messages

How a document flows through the six phases of the PSB: from Submit to Delivered or Failed, with status messages, webhooks and retry policy.

A document you submit via the PSB passes through a fixed sequence of processing phases — from submission to confirmed delivery or definitive failure. At each transition point, the PSB publishes a status message that you can retrieve via the status API or capture via a webhook.

This article describes the flow in detail, which status codes and topics the PSB publishes, how to query the status of a document and what happens when delivery or webhook notification fails.

The six phases of a document
Submit → Validate → Transform → Route → Acknowledge → Delivered
                                                   ↘ Failed
PhaseWhat happensTypical topicsSubmitThe document has been submitted via the API, a mailfrom hook, SFTP pull or another inbound method.PendingValidateThe PSB validates the document against schema and business rules (e.g. NLCIUS, Peppol BIS Billing, DICO).Validated, *ReceivedError on failureTransformOptional format conversion via the Transform engine (e.g. UBL to CII, PDF to UBL via IDR). This is an internal step.(internal, no separate topic)RouteThe PSB determines the destination: Peppol, email, SFTP or another channel or combination.RoutedAcknowledgeConfirmation from the receiving access point or channel.AcknowledgedDelivered / FailedDelivery is confirmed, or definitively failed after exhausting all retries.*Sent, *SentError

Submit can be initiated from various channels — REST upload, mailfrom hook, SFTP pull, Office 365 or another hook type. From Submit onwards, the flow is identical for every channel.

Status codes

The PSB publishes the following canonical statuses via topics and the status API:

StatusMeaningFinal status?PendingSubmitted, validation not yet startedNoValidatedValidation successfulNoRoutedDestination determined, ready for deliveryNoDeliveredDelivery confirmed by recipient or channelYesRejectedRejected by recipient (e.g. via MLS Reject)YesFailedDelivery definitively failed after all retriesYes

Additional fine-grained topics such as InvoiceSentRetry, InvoiceSentError and MessageLevelStatusReceived are available for monitoring via webhooks.

Querying status via the API

The current status of a document can be retrieved via a status endpoint per document type:

  • GET /api/v1/{partyId}/salesInvoice/{documentId}/status
  • GET /api/v1/{partyId}/purchaseInvoice/{documentId}/status

The response contains the current status, the timestamp of the last change and, in case of an error, an error code with description. Via a list endpoint per document type you can filter outstanding documents by status, period and (where relevant) recipient.

Status updates via webhooks

For real-time integration, webhook routing is preferred over polling. Subscribe to the relevant topics to receive direct notifications:

DirectionCommon topicsInboundInvoiceReceived, InvoiceReceivedError, OrderReceived, MessageLevelStatusReceivedOutboundInvoiceSent, InvoiceSentRetry, InvoiceSentError, OrderSent, OrderSentRetry, OrderSentErrorMonitoringHookSent, HookSentRetry, HookSentError

See Setting up webhooks for configuration, payload structure and HMAC signature.

Retry policy for document delivery

If a delivery attempt fails due to an error on the receiving side (e.g. 5xx from a Peppol Access Point), the PSB automatically resumes delivery with exponential backoff.

ParameterValueMaximum number of attempts8Total retry duration~3 days (approximately 72 hours) from the first attemptRetryable codes5xx and 429Not retryable4xx (except 429) — immediate *SentErrorBackoffExponential (increasing wait time per attempt)

With each delivery attempt, the PSB publishes a {DocumentType}SentRetry topic. After definitive failure, {DocumentType}SentError follows. If you receive an InvoiceSentError or OrderSentError, contact the recipient or escalate via eConnect Support.

Tip: subscribe to InvoiceSentRetry and InvoiceSentError via a webhook so you detect delivery problems immediately.

Retry policy for webhook delivery

The retry policy for webhook delivery — notifications to your own endpoint — is separate from the delivery retry policy.

ParameterValueMaximum number of attempts12Total retry duration~6 days (approximately 137 hours) from the first attemptBackoffExponential (increasing wait time per attempt)Timeout per attempt100 secondsEvent per attemptHookSentRetryEvent after definitive failureHookSentError

The PSB expects a 2xx response from your endpoint within 100 seconds. Process incoming webhooks as quickly as possible: confirm receipt with 200 OK and do heavy processing asynchronously in a background process.

Optionally: add the query parameter noRetryCodes to exclude specific HTTP codes from retry (e.g. ?noRetryCodes=400,401,403). Set up a mail hook or secondary webhook on HookSentError for operational monitoring.

Note: after approximately 6 days (137 hours) without successful delivery, the PSB stops retrying. Missed events can be retrieved via the batch endpoint. See Batch hooks.

Idempotency in the flow

Submit endpoints support idempotency via the X-EConnect-DocumentId header. On a duplicate submission, the PSB returns HTTP 409 Conflict. This ensures re-requests — e.g. after a network error — are never processed twice. See Idempotency for the full explanation.

Frequently asked questions
How do I track the status of a sent document?

You have two options. Via the status API (GET …/salesInvoice/{documentId}/status) you retrieve the current status. For real-time monitoring, set up webhooks on the relevant topics, such as InvoiceSent, InvoiceSentRetry and InvoiceSentError. Webhooks are preferred over polling.

What happens if a document cannot be delivered?

The PSB automatically retries delivery up to 8 times spread over approximately 3 days (72 hours). With each attempt you receive an {DocumentType}SentRetry notification (if you have set up a webhook). After definitive failure, {DocumentType}SentError follows and manual action is required.

How long does the PSB try to deliver a webhook?

The PSB tries to deliver a webhook notification up to 12 times, spread over approximately 6 days (137 hours). Per attempt there is a timeout of 100 seconds. After definitive failure, the HookSentError event follows.

What is the difference between Rejected and Failed?

Rejected means the recipient actively rejected the document — for example via an MLS Reject message. Failed means delivery definitively failed after exhausting all retries, without the recipient being reachable or explicitly rejecting the document.

Can I adjust the retry policy for webhooks?

Partially. With the query parameter noRetryCodes you can exclude specific HTTP codes from retry, so a deliberate 400 or 403 response does not trigger further attempts. The maximum number of attempts and retry duration are not configurable.

View the interactive API documentation