> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devmob.app.br/llms.txt
> Use this file to discover all available pages before exploring further.

# payment.overdue

> Evento emitido após vencimento de pagamento

`payment.overdue` é emitido depois que um [Payment](/data-modelling/billing/payment) vence.

Handlers usam este evento para executar efeitos assíncronos fora do fluxo síncrono.

## Detalhes do Evento

| Propriedade    | Valor                     |
| -------------- | ------------------------- |
| **Tipo**       | `payment.overdue`         |
| **Origem**     | Atualização de Payment    |
| **Publicação** | Após commit do Payment    |
| **Quando**     | `overdueAt` é preenchido. |

## Handlers

| Handler                        | Responsabilidade         | Dados usados | Execução    |
| ------------------------------ | ------------------------ | ------------ | ----------- |
| `send-payment-overdue-message` | Avisa pagamento vencido. | `data`       | Assíncrona. |

## Payload

| Campo  | Tipo      | Descrição                |
| ------ | --------- | ------------------------ |
| `data` | `Payment` | Entidade Payment vencida |

## Regras dos handlers

* Handlers não rodam na transação que publicou o Payment.
* Falha em handler não desfaz o Payment.
* Cada handler deve ser idempotente.
* Novos handlers podem ser adicionados sem mudar o fluxo síncrono.

## Exemplo

```json theme={null}
{
  "type": "payment.overdue",
  "data": {
    "paymentId": "0197a816-281b-72e7-8f50-286fbfc5c08d",
    "orderId": "0197a813-0fb9-7d42-9c81-50c0f6d9ae5a",
    "organizationId": "0197a801-1690-7590-b3cf-19599b9be3e4",
    "companyId": "0197a801-6a42-79aa-9e56-d3c85148c0fa",
    "externalProvider": "billing_interface",
    "externalProviderId": "pay_4a817c90",
    "description": "Pedido OAB-20260703-0001",
    "method": "PIX",
    "channel": "ONLINE",
    "card": null,
    "pix": {
      "qrCode": "00020101021226860014br.gov.bcb.pix2564pix.example.com/charge/pay_4a817c90",
      "expiresAt": "2026-07-03T16:30:00.000Z"
    },
    "amount": 11400,
    "dueDate": "2026-07-03T16:30:00.000Z",
    "status": "PENDING",
    "issuedAt": "2026-07-03T16:00:30.000Z",
    "paidAt": null,
    "overdueAt": "2026-07-03T16:31:00.000Z",
    "canceledBy": null,
    "canceledAt": null,
    "createdBy": "0197a805-0910-7eb2-bae7-90a13df2a9b2",
    "createdAt": "2026-07-03T16:00:30.000Z",
    "updatedBy": "0197a805-0910-7eb2-bae7-90a13df2a9b2",
    "updatedAt": "2026-07-03T16:02:00.000Z"
  }
}
```
