Skip to main content
Tesouro delivers webhook events via HTTP POST to your registered endpoint.

Retry behavior

If your endpoint returns a 5xx status or doesn’t respond, Tesouro retries using exponential backoff within a 12-hour window. Once the window closes, the event is permanently marked as failed.
Deliveries that fail with a 4xx status are not retried. This includes errors from an inactive or deleted subscription. Fix the underlying issue and resubmit if needed.

Retry schedule

AttemptDelay from previousCumulative time
11 minute~1 min
25 minutes~6 min
315 minutes~21 min
430 minutes~51 min
51 hour~1h 51m
62 hours~3h 51m
7+2 hoursContinues at 2-hour intervals (capped)

Best practices

  1. Respond quickly: Return 2xx immediately and process the payload asynchronously. Long-running handlers risk timeouts, which trigger unnecessary retries.
  2. Implement idempotency: Tesouro delivers at least once. Retries may send the same event more than once. Use a stable event identifier from the payload to detect and discard duplicates.
  3. Log deliveries: Record incoming webhook requests. Logs are essential for diagnosing failed or out-of-order deliveries.
  4. Order events correctly: Due to network latency and retries, events may arrive out of chronological order. Use the attributes.updatedTimestamp field to correctly sequence events.
  5. Verify signatures: Where applicable verify webhook signatures before processing events.