Retries & replay
What happens when your endpoint fails, and how to resend events.
A delivery succeeds when your endpoint responds with a 2xx status within 30 seconds. Any other status, a redirect, a timeout or a connection error is a failure.
Retry schedule
Failed deliveries are retried automatically. Each delay starts after the previous attempt fails:
| Attempt | Delay |
|---|---|
| 1 | Immediately |
| 2 | 5 seconds |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 5 hours |
| 7 | 10 hours |
| 8 | 10 hours |
After the last attempt fails, the event is marked failed. Every attempt keeps the same event id and svix-id.
Order and duplicates
Events can arrive out of order and more than once. For example, a retried order.expired can arrive after order.paid for the same order. Make your handler:
- idempotent: record each event
idyou have processed and skip repeats; - order-independent: never move an order from paid back to unpaid because of
order.expired.
When in doubt, read the current state with Retrieve an order.
Resending events
The endpoint's page in the merchant console lists every event with its attempts, response status and response body. Select an event and click 重新发送 (Resend) to deliver it again, for example after fixing a bug. A resent event keeps its id.
Disabled endpoints
While an endpoint is disabled, new events for it are not created and are not sent later. When you enable it again, you only receive events from that moment on. Use Retrieve an order to catch up on orders that changed in between.