# invoice.overdue

> The ByDomu invoice.overdue event (Invoice overdue): when it fires, how to subscribe, its fields and the payload delivered by webhook.


Invoice overdue

Object · invoice Scheduled

## When it fires

An unpaid invoice went past its due date. Fires once a day.

A scheduled ByDomu sweep emits it, not someone’s action: `actor.kind` tells you who: USER, NOA, SYSTEM, API, AUTOMATION or INTEGRATION.

## Subscribe with

- `invoice.overdue` Only this event
- `invoice.*` Every event of Invoice
- `*` The whole catalog

## Fields it carries

paths for filters and templates

`invoice.id` Invoice id

`invoice.invoiceNumber` Invoice number

`invoice.status` Invoice status

`invoice.total` Total

`invoice.paidAmount` Amount paid

`invoice.currency` Currency

`invoice.dueDate` Due date

`invoice.customerName` Customer

`invoice.sourceType` Source

Up to 5 attempts (0 s, 5 s, 30 s, 2 min and 10 min) on network errors, 429 or 5xx. Reply 2xx in under 10 s.

Payload:

```
{
  "event": "invoice.overdue",
  "id": "5f3a0c1e-7d2b-4f7e-9a51-0b6c1d2e3f40",
  "type": "invoice.overdue",
  "timestamp": "2026-09-22T14:30:00.000Z",
  "organizationId": "clx1org001",
  "actor": {
    "kind": "SYSTEM",
    "userId": null
  },
  "data": {
    "invoice": {
      "id": "clx1inv001",
      "invoiceNumber": "FV-2026-0123",
      "status": "ISSUED",
      "docType": "INVOICE",
      "sourceType": "COMMISSION",
      "customerName": "Jorge Salazar",
      "customerEmail": "jorge.salazar@example.com",
      "total": 13500000,
      "paidAmount": 0,
      "currency": "COP",
      "issueDate": "2026-09-22T00:00:00.000Z",
      "dueDate": "2026-09-15T00:00:00.000Z",
      "paidAt": null
    }
  }
}
```

Headers:

```
X-Domu-Event: invoice.overdue
X-Domu-Signature: t=1790610130,v1=9c1e…
User-Agent: Domu-Webhooks/2
```

Verify signature:

```
import { createHmac, timingSafeEqual } from "node:crypto";

// header = X-Domu-Signature: t=<timestamp>,v1=<hmac>
function verifyWebhook(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const timestamp = Number(parts.t);
  if (!timestamp || !parts.v1) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSec) return false;
  const expected = createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1);
  return a.length === b.length && timingSafeEqual(a, b);
}
```

**Get it with your test data** GET /v1/webhooks/sample/invoice.overdue

[Try it](https://developers.bydomu.com/en/referencia/get-webhook-sample?probar=1&type=invoice.overdue)
