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'
@aiden-f-dsouza▲ -3 net votes
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>)'.