Events
Chataigne persists the event and the business change in the same database transaction before queueing delivery. BullMQ transports the persisted delivery; it is not the source of truth.
Endpoint routing
An endpoint can be an observer or the primary order receiver.- A location endpoint has priority over an organization endpoint for the same event.
- If no location observer subscribes, organization observers are used as fallback.
- The effective primary receiver is the location receiver when present, otherwise the organization receiver.
- Exactly one primary receiver receives each order event for a location.
- A synchronous POS integration and an API receiver can both be active. Chataigne sends order events to both; restaurant operators are responsible for configuring downstream systems so they do not create duplicate operational orders.
- Observer endpoints can subscribe in parallel for analytics and other non-operational use cases.
Event envelope
id, not order id. Store the event identifier before performing side effects, then return any 2xx response. Repeated delivery of the same event must be a no-op.
Verify the signature
Each request includes:Chataigne-Event-IdChataigne-Timestampas Unix secondsChataigne-Signature: v1=<hex HMAC>
Chataigne-Event-Id. Always verify the raw body before JSON parsing; re-serializing JSON changes the signature.
Delivery and retries
Delivery is at least once. Chataigne treats any2xx as success. HTTP 408, 425, 429, 5xx, timeouts, and network failures are retried up to seven attempts with exponential backoff starting at five seconds. Other 4xx responses are terminal.
The durable recovery pass requeues pending deliveries and resets processing claims that have been stale for two minutes. A terminal delivery failure is visible in the delivery log and triggers an operational alert; it never cancels or refunds the order automatically.
Use the dashboard to send a synthetic test event, inspect attempts, rotate a signing secret, disable an endpoint, or manually retry a terminal delivery. Returning 2xx means “received”, not “accepted”; send a status update separately when the POS has made its business decision.