Webhooks¶
Receive real-time notifications when events occur in your account.
Configuration¶
Configure webhooks in Settings → API → Webhooks.
Events¶
| Event | Description |
|---|---|
invoice.created |
New invoice created |
invoice.sent |
Invoice sent to customer |
invoice.paid |
Invoice payment received |
invoice.overdue |
Invoice past due date |
customer.created |
New customer added |
Payload Format¶
{
"id": "evt_123",
"type": "invoice.paid",
"created_at": "2026-02-24T09:30:00Z",
"data": {
"id": "inv_456",
"number": "INV-2026-001",
"amount_paid": 1500.00,
"customer": {
"id": "cust_789",
"name": "Acme Corp"
}
}
}
Verification¶
Verify webhook signatures to ensure authenticity:
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
Retry Policy¶
Failed webhooks are retried with exponential backoff:
- 1st retry: 1 minute
- 2nd retry: 5 minutes
- 3rd retry: 15 minutes
- 4th retry: 1 hour
- 5th retry: 4 hours