Skip to content

Webhooks

Let your own software know right away that an invoice was issued, sent, paid or cancelled. Events, the message, verifying the signature, retries and the delivery log.

With webhooks your own software hears straight away when something happens in your EenFactuurMaken.nl account: an invoice is issued, sent, paid or cancelled, a credit note is issued or a quote is accepted. We then send a signed message (a POST with JSON) to a URL you choose, so you don't have to keep polling the API.

Pro

Webhooks are part of Pro. Manage them under Settings → Webhooks or through the API.

Events

EventWhen
invoice.issuedAn invoice got its number: issued in the app, through POST /invoices/{id}/issue, with "issue": true on create, or by a recurring invoice.
invoice.sentAn invoice or credit note was emailed. data.resend is true when it had been sent before. Reminders don't send an event.
invoice.paidAn invoice or credit note was marked as paid. Also again after unpaid followed by paid.
invoice.cancelledAn invoice or credit note was cancelled.
credit_note.issuedA credit note got its number. data.creditedInvoiceId is the invoice it corrects.
quote.acceptedA quote was accepted. data.invoiceId is the new draft invoice.

invoice.sent, invoice.paid and invoice.cancelled also cover credit notes; the message then says "kind": "credit_note". There's also webhook.test: we only send it with the test button, and you can't subscribe to it.

Setting up

  1. Go to Settings → Webhooks and click Add endpoint.
  2. Enter the URL of your receiver, for example https://your-app.com/webhooks/eenfactuurmaken.
  3. Tick the events you want to receive.
  4. Click Add endpoint and copy the signing secret (whsec_…). You only see it once.
  5. Send a test event to check that everything works.

You can have up to 5 endpoints, each with its own events and secret.

The message

Every message is a POST with Content-Type: application/json, the user agent EenFactuurMaken.nl-Webhooks/1.0 and this body:

json
{
  "type": "invoice.paid",
  "timestamp": "2026-11-02T10:15:00.000Z",
  "version": "2026-11-01",
  "data": {
    "object": "invoice",
    "id": "0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60",
    "kind": "invoice",
    "number": "2026-0042",
    "status": "paid",
    "issueDate": "2026-11-01",
    "dueDate": "2026-11-15",
    "currency": "EUR",
    "subtotalCents": 10000,
    "vatTotalCents": 2100,
    "totalCents": 12100,
    "issuedAt": "2026-11-01T09:12:00.000Z",
    "sentAt": "2026-11-01T09:13:00.000Z",
    "paidAt": "2026-11-02T10:15:00.000Z",
    "cancelledAt": null,
    "externalId": "order-1042",
    "customer": { "id": "9d2c1b0a-1234-4cde-8f00-aa11bb22cc33", "externalId": "cus_9" },
    "creditedInvoiceId": null,
    "sourceQuoteId": null,
    "resend": false,
    "links": {
      "api": "https://eenfactuurmaken.nl/api/v1/invoices/0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60",
      "pdf": "https://eenfactuurmaken.nl/api/v1/invoices/0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60/pdf"
    }
  }
}
  • externalId and customer.externalId are your own ids, so you can match the message to your own order or customer right away. See Integrate with your SaaS.
  • It contains no personal data: no lines, names, addresses or email addresses. If you need those, fetch the invoice through links.api with your API key.
  • For quote.accepted, data is a quote: object: "quote", id, number, status, acceptedAt, currency, totalCents, customer, invoiceId and links.
  • version is the payload version of the endpoint. New fields can be added without changing it; build your receiver so unknown fields don't break anything. A change that breaks existing receivers comes in a new version that you choose yourself (payloadVersion through PATCH /webhooks/{id}).

All fields per event are in the endpoint reference and in the OpenAPI spec (webhooks).

Verifying the signature

Every message has three headers following Standard Webhooks:

HeaderContent
webhook-idThe event id (msg_…). The same on every retry.
webhook-timestampUnix time in seconds of this attempt.
webhook-signaturev1, plus a base64 HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}. During a secret rotation there are two, separated by a space.

Verify the signature over the raw body, before you parse the JSON. In Node.js:

js
import crypto from 'node:crypto'

export function verifyWebhook(rawBody, headers, secret) {
  const id = headers['webhook-id']
  const ts = headers['webhook-timestamp']
  const signatures = headers['webhook-signature'] ?? ''
  if (!id || !ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false // older than 5 minutes: reject
  const key = Buffer.from(secret.slice('whsec_'.length), 'base64')
  const expected = crypto.createHmac('sha256', key).update(`${id}.${ts}.`).update(rawBody).digest('base64')
  return signatures.split(' ').some((s) => {
    if (!s.startsWith('v1,')) return false
    const value = s.slice(3)
    return value.length === expected.length && crypto.timingSafeEqual(Buffer.from(value), Buffer.from(expected))
  })
}

With Express:

js
import express from 'express'

const app = express()
app.post('/webhooks/eenfactuurmaken', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verifyWebhook(req.body, req.headers, process.env.EENFACTUURMAKEN_WEBHOOK_SECRET)) return res.sendStatus(400)
  const event = JSON.parse(req.body.toString('utf8'))
  await saveForProcessing(req.headers['webhook-id'], event) // store it and process it later
  res.sendStatus(204)
})

Rather use a library? Any Standard Webhooks library works, such as standardwebhooks (npm, PyPI and other languages) or svix: pass your secret (whsec_…) and let the library check the headers.

Responding

  • Respond within 10 seconds with a 2xx status, for example 204. We don't use the content of your response; we only keep the first 1 KB in the log.
  • Process the message afterwards, for example through a queue, so you don't run into the time limit.
  • We cut off a response larger than 64 KB (response_too_large); that counts as a failure.

Retries

The first attempt is immediate. If it doesn't work, we try again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours (with a little random spread). That's 8 attempts in total, in about 45 hours. After that the message is Failed.

ResponseWhat we do
2xxDelivered.
429 or 503Retry. If you send Retry-After, we wait at least that long (up to 24 hours).
Other 4xx and 5xx, timeouts, network and TLS errorsRetry on the schedule.
410 GoneFailed at once, no more attempts.
A redirect (3xx)Failed at once (redirect_not_followed). We never follow redirects: enter the final URL.

You can send a failed message again later from the log.

Duplicates and order

  • We send every event at least once, so after a timeout the same event can arrive twice. Store the webhook-id and skip ids you've already processed.
  • The order isn't guaranteed: invoice.paid can arrive before invoice.sent. Look at the timestamps in data (sentAt, paidAt) or fetch the current invoice through links.api.
  • A message we retry has exactly the same body. Only webhook-timestamp and the signature change.

Testing

Click Send test event on an endpoint, or use POST /webhooks/{id}/test. We then send a webhook.test right away, signed like real messages, also to an endpoint that's switched off. You see the status, the time and any error code straight away.

A test event isn't retried and doesn't count towards switching an endpoint off after errors. You can send 5 test events per minute.

The delivery log

For every endpoint, Delivery log shows the messages of the last 30 days: the event, the status, the number of attempts, the status code, the duration, the message itself and the start of your receiver's response.

StatusMeaning
WaitingWaiting for the (next) attempt.
SendingBeing sent now.
DeliveredYour receiver answered with 2xx.
FailedAll attempts are used up, or the error was permanent (410, redirect).
SkippedNot sent: the endpoint was switched off (endpoint_disabled) or your account wasn't on Pro (plan).

Error codes: timeout, dns_failed, tls_error, connection_refused, connection_error, blocked_destination, redirect_not_followed, response_too_large and http_<status>, such as http_500. Send again queues a failed or skipped message again, with a fresh retry schedule.

Rotating the secret

Click New secret on an endpoint (or POST /webhooks/{id}/rotate-secret). You choose how long the old secret keeps signing too: stop at once, 1 hour, 24 hours (default) or 72 hours. Meanwhile webhook-signature carries two signatures: first the one with the new secret, then the one with the old. Put the new secret in your receiver before the time is up. The example code above accepts the message when one of the two matches.

Switched off after errors

If an endpoint returns nothing but errors, we switch it off: after at least 10 failed attempts in a row and when the first of them is more than 5 days ago. Messages that are still waiting are skipped, and you get one email. A single successful message resets the count.

Fix the problem at your receiver, send a test event and switch the endpoint back on (or PATCH /webhooks/{id} with "active": true). Then send the skipped messages again from the log.

Which URLs are allowed?

To prevent abuse, we only send to public addresses on the internet:

  • https only, on port 443;
  • no user name or password in the URL and no #;
  • a host name, not an IP address, and no internal names such as localhost, .local or .internal;
  • every address the host name points to must be public (no private networks such as 10.0.0.0/8 or 192.168.0.0/16).

We check this on save, on every test event and on every attempt. An invalid URL returns 422 webhook_url_invalid; an address that isn't allowed or doesn't exist returns 422 webhook_url_blocked.

Testing locally

Want to test on your own computer? Use a tunnel that gives your local server a public https URL, and enter that URL.

When Pro stops

  • Your endpoints are kept. You can view them, see the log and delete them.
  • We stop sending. Messages that are still waiting (or being retried) at that moment are skipped, and then you get one email per endpoint. If nothing was waiting, you get no email.
  • Adding, changing, testing, creating a new secret and sending again need Pro (402 plan_upgrade_required).
  • When you're back on Pro, we send new events again. What you missed in between is not sent afterwards: compare with GET /invoices.

While our support team helps you

If an EenFactuurMaken.nl team member looks into your account at your request and, for example, marks an invoice as paid, we send no webhook for it. That way nothing happens outside your account that you didn't do yourself. To be sure your system is up to date, fetch the list now and then, for example GET /invoices?status=paid&sort=-createdAt, and compare it with your own records.

Webhooks through the API

EndpointWhat
GET /webhooksYour endpoints.
POST /webhooksAdd an endpoint: url, events, optionally description and active. The response contains the secret (this once only).
GET /webhooks/{id}One endpoint.
PATCH /webhooks/{id}Change url, description, events, active or payloadVersion.
DELETE /webhooks/{id}Delete it, with its log.
POST /webhooks/{id}/testSend a test event.
POST /webhooks/{id}/rotate-secretNew secret, with previousSecretTtlHours (0 to 72, default 24).
GET /webhooks/{id}/deliveriesThe log, with status, page and pageSize.
GET /webhooks/{id}/deliveries/{deliveryId}One message, with the body and the start of the response.
POST /webhooks/{id}/deliveries/{deliveryId}/retrySend a failed or skipped message again.

These endpoints need an API key with Full access. Viewing, the log and deleting also work without Pro. All fields are in the endpoint reference.

Last updated on 29 October 2026

Stuck?

Email us at support@eenfactuurmaken.nl. Tell us what you tried and what happened, and we will help you out.

support@eenfactuurmaken.nl