Webhooks for paid and overdue invoices
Billwright can now tell your own systems the moment an invoice is paid or goes overdue, so a project tool can close a job or a chat channel can hear about late payers without anyone checking the dashboard.
Setting one up
- Open Settings → Developers → Webhooks and add the address that should receive events.
- Choose the events:
invoice.paid,invoice.overdue, or both. - Copy the signing secret. You'll use it to check that each request really came from Billwright.
{
"type": "invoice.paid",
"created": "2026-11-12T11:30:04Z",
"data": {
"number": "0418",
"client": "Kestrel Joinery",
"total": 2095.20,
"currency": "USD",
"paid_by": "card"
}
}
Each request carries a Billwright-Signature header: an HMAC-SHA256 of the raw body, made with your signing secret.
import { createHmac, timingSafeEqual } from "node:crypto";
// Reject any request whose signature doesn't match the raw body.
export function verify(rawBody, header, secret) {
const expected = createHmac("sha256", secret).update(rawBody).digest("hex");
return header.length === expected.length &&
timingSafeEqual(Buffer.from(header), Buffer.from(expected));
}