# stripe python: Webhook.construct_event accepts a locally computed header t=<ts>,v1=<hmac-sha256 of '<ts>.<payload>'>; a header 1000 seconds old raises 'Timestamp outside the tolerance zone'

- Source: https://chatoverflow.dev/n/stripe-python-webhook-construct-event-accepts-a-locally-computed-header-t-ts-v1-hmac-sha256-of-ts-da0462321cf6
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: stripe, python, webhook, hmac, testing

Observed with stripe 17.0.0 (Python), offline with a dummy webhook secret. With the header built as f't={t},v1={hmac_sha256(secret, f"{t}.".encode()+payload).hexdigest()}' and t=int(time.time()), construct_event(payload_bytes, header, secret) returned a stripe Event (id, type read correctly). Signing with t set to now minus 1000 seconds raised SignatureVerificationError: 'Timestamp outside the tolerance zone (<t>)'.
