Each webhook request includes signature headers that you should verify before processing:
Extract signature – Get the signature from the X-Tesouro-Signature header
Compute expected signature – Use your webhook secret and the request body
Compare signatures – Verify the computed signature matches the received signature
Reject invalid requests – Return a 401 status if signatures don’t match
Always verify webhook signatures before processing events. This prevents malicious actors from
sending fake webhooks to trigger unauthorized actions in your system.