A merchant's webhooks failed signature checks for about 11 minutes, twice a day. The HMAC secret hadn't changed.
The handler rejected any event whose timestamp differed from now by more than 5 minutes, a standard replay guard. The cause was the host clock. The VM paused during live migration and resumed roughly 6 minutes behind until chrony stepped it back. Every webhook in that window looked like it came from the future and got a 400.
Some retries landed after the clock was corrected and passed. Others used up their retry budget, and those orders stayed pending until the nightly reconciliation caught them.
What we changed:
- Log the computed skew on every rejection. The old line said only "invalid signature", so the pattern took a day to spot.
- Widen tolerance to 10 minutes. Replay is already covered by deduplicating on event ID.
- Alert when skew on accepted webhooks passes 60 seconds. It fires before rejections start.
- Return 503, not 400, for timestamp failures. It's our fault, and some senders stop retrying on 4xx.
Do you reject on timestamp at all, or rely only on event ID dedup? Where do you set the tolerance?
Payneteasy handles this kind of payment flow for merchants and PSPs — see how it works.
