Developer Docs
English
English
Rules your receiver endpoint must follow and how Zertiban behaves when something fails.
This section defines how Zertiban delivers webhooks and the requirements the receiver endpoint must meet to guarantee a stable, consistent and resilient integration.
Zertiban implements an at-least-once delivery model: the same event may be sent more than once in retry scenarios or network failures. For this reason, deduplication on the receiver side is mandatory.
The endpoint that receives webhooks must satisfy the following functional and technical requirements:
2xx in under 5 seconds. If processing takes longer, respond 200 OK immediately and continue processing asynchronously in the background.eventUuid as the idempotency key. Store processed events and discard them if received again to avoid duplicated side effects.3xx responses. Zertiban does not follow redirects under any circumstances: any redirect can cause event loss.timestamp to detect stale events, as described in Ordering and out-of-order delivery.Asynchronous processing recommended
If your business logic involves expensive operations or depends on external systems (ERP, DB, emails, queues…), apply the following pattern:
200 OK immediately.This approach improves system resilience and avoids blocking the reception of new events.
Zertiban automatically retries webhook delivery when it does not receive a satisfactory response. The policy is defined as follows:
| Parameter | Value |
|---|---|
| Total attempts | 3 |
| Interval between retries | 0.5 seconds (fixed) |
| HTTP connection timeout | 5 seconds |
| HTTP response timeout | 5 seconds |
If all 3 attempts fail, undelivered events are retried via an internal batch process roughly every 1 minute. This mechanism ensures high delivery availability even in case of temporary failures on the receiver endpoint.
Zertiban does not guarantee that events arrive in the order they happened. Retries and batch reprocessing shift a failed delivery further into the future, so a retried event can land behind an event that was emitted later — a status change retried through the batch process may reach you a minute after the status change that followed it.
The body timestamp is what tells you the real order: it records when the underlying action occurred and it is identical across all retry attempts of the same event. Neither the zb-timestamp header nor the arrival order do, since both reflect delivery time. See The two timestamps for the full comparison.
The comparison decides whether to apply the state, not whether to keep the event. Persist every event you receive: a late arrival is still a fact about your resource, and several event types share the same resource.uuid without carrying a state transition — OPERATION_OPENED and OPERATION_COMPLETED are both about the same operation, and discarding the former because the latter arrived first loses the open, which was never competing with it.
eventUuid first. If you have already seen it, you are looking at a retry: stop here.timestamp says.uuid, the timestamp of the newest event whose state you have applied.timestamp is newer, apply the state and update the stored value.eventUuid has already ruled out a duplicate. Neither is stale, so process both; if their states conflict, resolve it with a rule of your own, because the payload does not order them.Respond 2xx in every case. An event whose state you skipped has still been received correctly, and any other response will make Zertiban retry it.
Deduplication and ordering are two different guards
eventUuid stops the same event being applied twice, timestamp stops an older event overwriting newer state. A consumer needs both: timestamp is not an idempotency key, since two different events of the same resource can share it.
If webhooks are not arriving correctly, verify the following:
businessUuid.2xx codes, in under 5 seconds. 3xx, 4xx or 5xx responses can trigger retries or event loss.ngrok http 3000). The generated public URL can be used as a temporary endpoint in sandbox.zb-signature and zb-timestamp, and validate the signature calculation afterwards. This makes it easier to spot discrepancies in your algorithm implementation.Debug shortcut
Always log eventUuid, eventType, zb-timestamp and the signature verification result. This approach simplifies incident diagnosis and significantly reduces integration time.
A well-designed webhook consumer should prioritize:
This guarantees a robust, scalable integration that is consistent with Zertiban's delivery model.