Skip to main content
Understand how Baanx delivers webhook events, what HTTP responses are expected from your endpoint, and how automatic retries work.

Delivery Guarantees

Because delivery is at-least-once, always use event_id as an idempotency key to prevent processing the same event twice. See Event Types & Payload Structure for an example.

Responding to Webhooks

Your endpoint must return an HTTP response within 30 seconds. To meet this reliably:
  1. Acknowledge immediately — return a 2xx response as soon as you’ve received and validated the request
  2. Process asynchronously — push the event to an internal queue and process it in the background
  3. Verify the signature first — return 401 if the signature is invalid (this will not be retried)

Success Responses

Any 2xx status code is treated as a successful delivery:

Client Error Responses — Not Retried

4xx responses are treated as permanent failures and will not be retried. Use these to signal that the request itself is invalid.

Server Error Responses — Will Retry

5xx responses and network failures trigger automatic retries:

Retry Policy

When delivery fails with a 5xx response or a network error, Baanx automatically retries with exponential backoff: Retry rules:
  • Maximum 5 retry attempts after the initial delivery (6 total attempts)
  • Only 5xx status codes and network failures trigger retries
  • 4xx errors are not retried — they indicate a client-side problem
  • The same event_id is used across all attempts
  • After all retries are exhausted, the event is marked failed and can be manually retried

Handling Duplicates

Since retries use the same event_id, your endpoint should store processed event IDs and skip re-processing:

Monitoring Deliveries

Use the API to inspect delivery history and troubleshoot failures:

Webhook Delivery Logs

View recent delivery attempts for a specific webhook endpoint

Event Delivery Logs

See all delivery attempts for a specific event across all webhooks

Retry an Event

Manually trigger re-delivery of a failed event

List Events

Browse events and filter by status to find failures