Replay webhook deliveries
Use webhook delivery logs and replay endpoints to recover failed delivery without duplicate processing.
0Bit product APIs keep partner-scoped webhook delivery records where the product contract supports delivery listing and replay. The audited 0Gate API surface includes delivery and replay operations. For 0Base, use product documentation and account-specific enablement notes until partner API pages are published. Replay is a recovery tool for terminal failed delivery, not a replacement for idempotent processing.
Replay can redeliver a real event
Always dedupe by event id before applying business effects. A replay should be boring because your fulfillment path is already idempotent.
Recovery loop
Delivery statuses
| Common state | Examples in audited surfaces | Your action |
|---|---|---|
| Queued | 0Gate pending; 0Base pending | Wait or check endpoint health. |
| In flight | 0Gate in_flight; product equivalent if documented | Do not replay yet. |
| Delivered | 0Gate succeeded; 0Base delivered | Inspect your event log if state did not move. |
| Terminal failed | 0Gate dead_lettered; 0Base dead | Fix the handler, then replay if the product API permits it. |
Replay pattern
async function replayDeadLetteredDelivery(deliveryId: string) {
const delivery = await productWebhooks.replayDelivery(deliveryId);
await supportTimeline.add({
kind: 'webhook_replayed',
deliveryId: delivery.id,
eventId: delivery.event_id,
status: delivery.status,
});
return delivery;
}Operational checklist
- Confirm the endpoint is reachable over HTTPS.
- Confirm raw-body verification succeeds with the configured webhook secret.
- Confirm your handler returns 2xx before long-running work starts.
- Confirm event id dedupe is active.
- Replay only dead-lettered deliveries that belong to your account.
- Watch your own event log and product state after replay.
What not to expose
| Avoid | Why |
|---|---|
| Raw webhook payload logs in support tools. | Payloads can contain customer or transaction data. |
| Signature headers in tickets. | They are verification material. |
| Internal delivery worker details. | Partners only need status and recovery behavior. |
| Provider failure details. | Keep user-facing errors generic and approved. |