You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: tolerance_seconds rejects every Orders API notification (ts in milliseconds)Β #159
Since #142, WebhookSignatureValidator.validate treats ts as seconds when tolerance_seconds is set (mercadopago/webhook/validator.py, drift_ms = abs(now() - int(ts) * 1000)). That fixed Payments notifications, where ts has 10 digits (1704908010), but Orders API notifications send a 13 digit timestamp. The Orders notifications page shows x-signature: ts=1742505638683,v1=.... For that value the drift is tens of thousands of years, so every Orders notification with a valid signature is rejected with TimestampOutOfTolerance. docs/webhooks.md recommends tolerance_seconds=300, and the validate docstring itself says ts=<ms>.
The Node SDK has the same code, and the Go SDK has the opposite problem (mercadopago/sdk-go#155).
β Expected Behavior
A valid notification within the tolerance is accepted for both formats: 10 digit seconds (Payments) and 13 digit milliseconds (Orders).
β Actual Behavior
InvalidWebhookSignatureError: TimestampOutOfTolerance for every Orders notification when tolerance_seconds is set.
π Steps To Reproduce
Run the example below. It signs an Orders style notification and validates it one second later.
Hi! Just a quick update β I've completed the fix and pushed it to my fork.
I reproduced the bug with a failing regression test, fixed the timestamp handling for both Payments and Orders notifications, and verified that all 208 unit tests pass locally.
However, GitHub says that only repository collaborators can open pull requests, so I'm currently unable to submit the PR.
Activity
dansonofbass commentedon Nov 16, 2026
Hi! Just a quick update β I've completed the fix and pushed it to my fork.
I reproduced the bug with a failing regression test, fixed the timestamp handling for both Payments and Orders notifications, and verified that all 208 unit tests pass locally.
However, GitHub says that only repository collaborators can open pull requests, so I'm currently unable to submit the PR.
Here's the completed change:
master...dansonofbass:sdk-python:hotfix/159-webhook-timestamp-units
Would it be possible to enable external contributions or let me know how I should submit the fix?
Thanks!