{"templateId":"markdown","versions":[{"version":"v1","label":"v1","link":"/developer-resources/ingrid-api/v1/webhooks/integration","default":true,"active":false,"folderId":"570314d1"},{"version":"v1.preview","label":"v1.preview","link":"/developer-resources/ingrid-api/v1.preview/webhooks/integration","default":false,"active":true,"folderId":"570314d1"}],"sharedDataIds":{"sidebar":"sidebar-developer-resources/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Webhook integration"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhook-integration","__idx":0},"children":["Webhook integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your webhook endpoint should accept HTTPS ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," requests with a JSON body and"," ","return a success status as soon as the payload has been durably accepted."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"receiving-requests","__idx":1},"children":["Receiving requests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recommended practices include:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["expose the webhook endpoint over HTTPS"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["parse the request body as JSON"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["treat ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," as the idempotency key for the delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["store the raw payload before performing expensive downstream processing"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["return a response promptly and process side effects asynchronously"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["HMAC authentication is always enabled. Every delivery includes the"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Ingrid-Timestamp"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Ingrid-Signature"]}," headers; verify them as described"," ","in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/developer-resources/ingrid-api/v1.preview/webhooks/verifying-requests"},"children":["Verifying Requests"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["OAuth 2.0 Client Credentials authentication is optional. When configured,"," ","Ingrid uses the provided client credentials to obtain an access token from your"," ","authorization server, then includes it in the webhook request as"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: Bearer <token>"]},". For protocol details, see"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.rfc-editor.org/rfc/rfc6749.html#section-4.4"},"children":["RFC 6749 (The OAuth 2.0 Authorization Framework)"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"routing-payloads","__idx":2},"children":["Routing payloads"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the top-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," field to route the payload family:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ECOM_ORDER"]}," for order payloads"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PARCEL"]}," for parcel payloads"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then use the two trigger fields for different purposes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggeringEvent"]}," is the canonical business event from Ingrid's public event"," ","catalog, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order.confirmed.v1"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parcel.on_route.v1"]},", or"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parcel.out_for_delivery.v1"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggerName"]}," is the configured scenario name that matched and caused this"," ","delivery to be sent to your endpoint"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Receiver logic should generally branch primarily on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggeringEvent"]},". Use"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggerName"]}," as contextual metadata for routing, debugging, analytics, or to"," ","distinguish multiple subscriptions built on the same business event."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Example:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggeringEvent: order.confirmed.v1"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggerName: high-value-orders-us"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This indicates that the business event was ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["order.confirmed.v1"]},", and that the"," ","delivery originated from the configured scenario for high-value US orders."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"acknowledgment-semantics","__idx":3},"children":["Acknowledgment semantics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treat the webhook as successfully received only after you have:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["parsed the request"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["validated that the payload is structurally acceptable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["stored it or handed it off to a durable internal queue"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your endpoint cannot safely accept the event, return an appropriate non-2xx"," ","response and allow the sender to retry according to the delivery policy."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"idempotency","__idx":4},"children":["Idempotency"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhook consumers should expect duplicate delivery attempts and design handlers"," ","to be idempotent."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["reject duplicates that were already processed"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["correlate retries of the same delivery"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["trace a delivery across logs, queues, and downstream jobs"]}]}]},"headings":[{"value":"Webhook integration","id":"webhook-integration","depth":1},{"value":"Receiving requests","id":"receiving-requests","depth":2},{"value":"Routing payloads","id":"routing-payloads","depth":2},{"value":"Acknowledgment semantics","id":"acknowledgment-semantics","depth":2},{"value":"Idempotency","id":"idempotency","depth":2}],"frontmatter":{"title":"Webhook Integration","description":"How to receive, validate, route, and acknowledge Ingrid webhook deliveries","seo":{"title":"Webhook integration"}},"lastModified":"2026-09-16T11:59:37.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/developer-resources/ingrid-api/v1.preview/webhooks/integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}