Delivery
Webhook endpoints
Each worker process reads one target URL from RECEIVER_URL. The current tenant schema has no destination field and the API has no endpoint-registration route or per-tenant destination management.
Configure a destination
RECEIVER_URL=http://127.0.0.1:4000/webhookUse the same configured receiver URL in the API when requesting manual replay. Replay checks that the archived destination matches this value. Changing it does not provide per-tenant routing.
Delivery envelope
The worker sends an HTTP POST containing the event ID, tenant ID, original type and resolved payload. IDs below are placeholders describing the envelope shape:
{
"eventId": "REPLACE_WITH_EVENT_UUID",
"tenantId": "REPLACE_WITH_TENANT_UUID",
"type": "order.shipped",
"payload": { "orderId": "order_123" }
}The request includes Content-Type: application/json and X-Waybill-Signature. An S3-backed payload is loaded before signing and delivery; receivers get the payload, not the storage pointer.
Receiver behaviour
The outbound request has a 10-second timeout. Any 2xx response counts as success; other statuses and network failures enter the retry path. Success is stored before the SQS message is deleted.
Verify the signature against raw bytes and process duplicate event IDs safely. A crash after the endpoint accepts a request can lead to another attempt.