Your webhook endpoint should accept HTTPS POST requests with a JSON body and return a success status as soon as the payload has been durably accepted.
Recommended practices include:
- expose the webhook endpoint over HTTPS
- parse the request body as JSON
- treat
idas the idempotency key for the delivery - store the raw payload before performing expensive downstream processing
- return a response promptly and process side effects asynchronously
HMAC authentication is always enabled. Every delivery includes the X-Ingrid-Timestamp and X-Ingrid-Signature headers; verify them as described in Verifying Requests.
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 Authorization: Bearer <token>. For protocol details, see RFC 6749 (The OAuth 2.0 Authorization Framework).
Use the top-level type field to route the payload family:
ECOM_ORDERfor order payloadsPARCELfor parcel payloads
Then use the two trigger fields for different purposes:
triggeringEventis the canonical business event from Ingrid's public event catalog, for exampleorder.confirmed.v1,parcel.on_route.v1, orparcel.out_for_delivery.v1triggerNameis the configured scenario name that matched and caused this delivery to be sent to your endpoint
Receiver logic should generally branch primarily on triggeringEvent. Use triggerName as contextual metadata for routing, debugging, analytics, or to distinguish multiple subscriptions built on the same business event.
Example:
triggeringEvent: order.confirmed.v1triggerName: high-value-orders-us
This indicates that the business event was order.confirmed.v1, and that the delivery originated from the configured scenario for high-value US orders.
Treat the webhook as successfully received only after you have:
- parsed the request
- validated that the payload is structurally acceptable
- stored it or handed it off to a durable internal queue
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.
Webhook consumers should expect duplicate delivery attempts and design handlers to be idempotent.
Use id to:
- reject duplicates that were already processed
- correlate retries of the same delivery
- trace a delivery across logs, queues, and downstream jobs