> ## Documentation Index
> Fetch the complete documentation index at: https://developer.pagou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Exemplos de Webhooks

> Handlers de webhook executáveis por linguagem para as famílias de eventos de transação, assinatura e transferência.

Código executável para o fluxo de Webhooks: handlers reais para as três famílias de envelope atuais.
Todos os handlers respondem `2xx` rápido, deduplicam pelo id de evento de nível superior, transferem a
reconciliação lenta para segundo plano, ignoram redelivery e alteram o estado de negócio somente em
eventos confirmados. O contrato público não expõe assinatura; a autenticidade é estabelecida
reconciliando contra a API.

**Guia:** [Visão geral de webhooks](/pt/webhooks/overview) ·
[Eventos de pagamento](/pt/webhooks/payment-events) ·
[Eventos de assinatura](/pt/subscriptions/webhooks) ·
[Eventos de transferência](/pt/webhooks/transfer-events) ·
[Retentativas & reconciliação](/pt/webhooks/retries-and-reconciliation)

A entrega de webhook é inbound, então não há operação OpenAPI para referenciar.

## Famílias de envelope

| Família        | Correspondência                                   | Discriminador     |
| -------------- | ------------------------------------------------- | ----------------- |
| transações     | `event = "transaction"`                           | `data.event_type` |
| assinaturas    | `event = "subscription"`                          | `data.event_type` |
| transferências | `type` de nível superior presente + `data.object` | `data.object`     |

## Código de exemplo por linguagem

| Linguagem         | Diretório                                                                                   | README                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| TypeScript / Node | [`typescript/webhooks/`](https://github.com/PagouAi/examples/tree/main/typescript/webhooks) | [README](https://github.com/PagouAi/examples/blob/main/typescript/webhooks/README.md) |
| Python            | [`python/webhooks/`](https://github.com/PagouAi/examples/tree/main/python/webhooks)         | [README](https://github.com/PagouAi/examples/blob/main/python/webhooks/README.md)     |
| PHP               | [`php/webhooks/`](https://github.com/PagouAi/examples/tree/main/php/webhooks)               | [README](https://github.com/PagouAi/examples/blob/main/php/webhooks/README.md)        |
| Java              | [`java/webhooks/`](https://github.com/PagouAi/examples/tree/main/java/webhooks)             | [README](https://github.com/PagouAi/examples/blob/main/java/webhooks/README.md)       |
| C# / .NET         | [`dotnet/webhooks/`](https://github.com/PagouAi/examples/tree/main/dotnet/webhooks)         | [README](https://github.com/PagouAi/examples/blob/main/dotnet/webhooks/README.md)     |
| Go                | [`go/webhooks/`](https://github.com/PagouAi/examples/tree/main/go/webhooks)                 | [README](https://github.com/PagouAi/examples/blob/main/go/webhooks/README.md)         |
| Ruby              | [`ruby/webhooks/`](https://github.com/PagouAi/examples/tree/main/ruby/webhooks)             | [README](https://github.com/PagouAi/examples/blob/main/ruby/webhooks/README.md)       |
