Peppol inbound delivery webhook (AP)

View as Markdown
Inbound delivery webhook for received Peppol e-invoices — the **AP inbound path**. > **Not for manual use.** You do not call this endpoint yourself. It is invoked by **Staple internally**, whenever an e-invoice addressed to your company is routed to Staple over the Peppol network. ## How it fits the flow 1. A supplier sends an e-invoice over Peppol addressed to your participant ID. 2. The Peppol network (SML → SMP → AS4) routes it to **Staple**. 3. Staple hands the raw PINT-SG document (SBDH envelope + UBL body) to this webhook. 4. Staple resolves the recipient company from the SBDH `Receiver`, creates the document, and fans it out into the recipient's inbox queue(s). From there you work the received document like any other. To report its tax to IRAS, process it through the **Flow 3A** flow — submit it via [`POST /v2/einvoice/ar/{qid}`](/api-reference/v2/e-invoice/send-e-invoice-for-singapore) with `country=SG`, `destination=iras`, and `Transaction Type: Purchases`. ## Delivery contract The HTTP status tells the caller whether to acknowledge or retry the delivery: | Outcome | HTTP | Meaning | |---|---|---| | `status: SUCCESS` | **200** | Delivered (or already processed) — acknowledged, done. | | `status: FAILED` | **503** | In-flight / incomplete fan-out / transient error — the delivery is **retried**. | ## Authentication Public endpoint — **no `x-api-key` or bearer token**. It is called machine-to-machine by Staple internally, not by API clients. The request body is the raw PINT-SG XML document (SBDH-wrapped UBL Invoice or Credit Note).

Request

This endpoint expects any.

Response

Delivered / already processed — acknowledged.