Mock network

A simulated 5-corner Peppol network you can transmit to. It behaves like the real thing on the legs that matter, and — unlike an Access Point sandbox — it will fail on demand.

The five corners

Classic Peppol is four corners: supplier → sending Access Point → receiving Access Point → buyer. The UAE adds a fifth, the tax authority, which receives its copy as part of the exchangerather than as a later filing. That is what “continuous transaction control” means, and it is the reason a validator alone tests only part of what can go wrong.

CornerWhat we simulate
c2-validationThe sending Access Point validates before it transmits. An invalid document never reaches the network.
smp-lookupDiscovery: turning a participant identifier into an endpoint, certificate and supported document types.
c3-deliveryThe receiving Access Point, with configurable latency and acceptance.
mlrA real UBL ApplicationResponse with AP / AB / RE codes and structured reasons.
c5-reportingThe tax authority’s reporting copy, and whether it was accepted.

Transmitting

POST your document to /as4. Pick the scenario with a header; without one, the default happy path applies.

curl -X POST http://localhost:8082/as4 \
  -H "Content-Type: application/xml" \
  -H "X-PeppolProbe-Scenario: uae-receiver-rejects-trn" \
  --data-binary @invoice.xml

Three request shapes are accepted, in decreasing order of realism: MIME multipart with a SOAP envelope and the payload in its own part; a plain SOAP envelope; or a bare invoice. The last is not AS4 at all, and we take it anyway — your first attempt should fail for reasons that are about your integration, not about our packaging.

What comes back

An ebMS3 Receipt with the Message Level Response inside it, or an ebMS3 Error with a fault code. Every response carries X-PeppolProbe-Simulated: true, and every MLR says so in its own text. A simulated response must never be mistakable for a real one.

FaultMeans
EBMS:0004Other — an unregistered participant, a document type mismatch, or a sender-side rejection.
EBMS:0005Connection failure — discovery infrastructure is down. Worth retrying.
EBMS:0101Failed authentication — an expired certificate. Not worth retrying.
HTTP:5xxThe receiving Access Point itself failed.

From CI

The CLI asserts the outcome for you, so a scenario is a test rather than a demo.

peppolprobe scenario list
peppolprobe scenario run uae-smp-lookup-fails ./invoice.xml
peppolprobe scenario log

Exit code 0 when the scenario behaved as declared, 1 when it did not.

Registering participants

Discovery is strict on purpose: an unregistered participant fails, because that is what happens on the real network when a customer gives you a TRN that is not on it yet. Register the ones your tests use.

curl -X POST http://localhost:8082/participants \
  -H "Content-Type: application/json" \
  -d '{
    "participantId": "0235:100123456789003",
    "name": "My test buyer",
    "documentTypes": ["urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:peppol:pint:billing-1@ae-1::2.1"],
    "endpointUrl": "https://mock.peppolprobe.local/as4",
    "certificateSubject": "CN=Test",
    "certificateExpiresAt": "2027-01-01T00:00:00Z"
  }'

Custom scenarios

Define your own when the twenty built-ins do not cover a failure you have actually seen. Built-in slugs cannot be redefined — a uae-happy-path that behaved differently from ours would make every support conversation confusing.

curl -X POST http://localhost:8082/scenarios \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "uae-custom-flaky-smp",
    "title": "SMP answers after 20 seconds",
    "corners": { "smp": { "resolves": true, "latencyMs": 20000 } },
    "expect": { "outcome": "accepted", "mlrResponseCode": "AP" }
  }'

What this network cannot do

It cannot reach the real Peppol network or any tax authority — not by configuration, but because a host outside its allowlist cannot be resolved inside the process at all. Check the running service yourself at /boundary, and see the boundary for how it is enforced and tested.