POST /webhooks and receives its own secret for verifying the signature.
Events
The proposal is that a destination can subscribe to all events or to a list of them only.
Payload format
All events share the same envelope. Thedados field carries the resource in the same format returned by the API.
Illustrative example
Signature verification
Each delivery includes theTesa-Signature header in the format t=<timestamp>,v1=<signature>. The signature is the hex-encoded HMAC-SHA256 of the string <timestamp>.<raw body>, using the destination’s secret.
Node.js
Delivery and retries
- The destination must respond with any
2xxstatus within 10 seconds. Heavy processing should happen after the response. - Without a
2xx, TESA retries with increasing backoff: 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours. After that, the event is marked as failed. - Failed events can be viewed and resent from the dashboard.
- Delivery is at least once: the same event may arrive more than once. Use the event
idto discard duplicates. - Arrival order is not guaranteed. Use
criado_emand the resourcestatus, or query the API, before acting.
A webhook is a notification, not a command. An
alocacao.aprovada event does not move funds by itself: funds move only after signing by the company’s custodian.