Webhook
Webhook
Um webhook é um HTTP callback enviado quando um evento acontece. Ele avisa outro sistema para reagir.
Outro exemplo
Um serviço de pagamento envia um evento assinado de payment.succeeded para o serviço de pedidos.
Partes principais
- 01Originating request
- 02Resolution or processing hop
- 03Response, timing, and failure
Use-o quando
Assine cada payload. Faça o manuseio idempotente, tente reenviar os envios com falha e mantenha registros duráveis de eventos.
Não o use quando
Nunca assuma que os eventos chegam em ordem ou apenas uma vez. Nunca confie em um remetente que você não verificou.
Nome usado no código
POST callback + signature Antes de lançar
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Complete the task with Webhook (Webhook). User context: Um serviço de pagamento envia um evento assinado de payment.succeeded para o serviço de pedidos. Technical concept or control: Webhook (Webhook). Why it fits: Assine cada payload. Faça o manuseio idempotente, tente reenviar os envios com falha e mantenha registros duráveis de eventos. Do not use it when: Nunca assuma que os eventos chegam em ordem ou apenas uma vez. Nunca confie em um remetente que você não verificou. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): Nenhum padrão oficial único controla todo o termo. Seu significado pode mudar entre equipes, plataformas ou frameworks. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Conferir este pedido
Review how Webhook (Webhook) is used now. Definition: Um webhook é um HTTP callback enviado quando um evento acontece. Ele avisa outro sistema para reagir. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.