Skip to main content
Cleo sends a signed HTTPS POST to your endpoint when a payment, invoice, payable, bank account or contact changes. Webhooks are in early access: ask your Cleo contact to turn them on for the business. Until then the endpoint management calls answer 403 feature_unavailable.

Manage endpoints

Use the API, the MCP tools, or Settings, Developers, Webhooks in the Cleo web app. Reads need webhooks:read and writes need webhooks:manage. The URL must be https:// and publicly resolvable. Addresses that resolve to loopback, link-local or private ranges are refused. Subscribe to a list of event types, or to ["*"] for all. The secret (whsec_...) appears only in the create and rotate answers. Afterwards only secretLast4 is shown. Those two calls take no Idempotency-Key. If a create times out, list the endpoints before you create another.

The event

Every delivery is a thin reference, not a snapshot:
The body never contains the resource, amounts or reasons. Fetch the current state: The API is the source of truth. Treat events as a signal to fetch, and reconcile with GET. Each fetch counts against your rate limit. Back webhooks up with a scheduled poll, as described in Sync bills and payments.

Event types

Payments

One bill can have several payments: retries, partial payments and splits. Each payment event names one payment. Cleo sends at most one event of each type per payment. A few rare paths do not send an event yet:
  • A scheduled Cleo Pay payment does not send payment.processing when its run starts.
  • A Dwolla transfer that fails while Cleo starts it does not send payment.failed. The bill still sends payable.payment.failed.
  • A failed pay-link payment on an invoice that keeps other paid money does not send payment.failed.
  • Payments repaired by a reconciliation job after a missed bank notice do not send an event.
Payments made by a guest on a pay link have no sending business in Cleo, so they send no payment events. The invoice’s business gets invoice.paid.

Invoices

Invoices also send the payable.* events, because an invoice is a payable. A customer on Cleo that pays the invoice receives those payable.* events too. invoice.sent and invoice.paid go to the sender only.

Payables

payable.updated is not sent for:
  • status changes, which send their own event above;
  • creating the bill, which sends payable.created;
  • changes that rewrite many bills at once: merging a category, disconnecting an accounting integration, or deleting a tag. These still move each bill’s updatedAt, so an updatedSince poll finds them.
An automation that runs right after a bill is created, such as AI categorization or attaching the files from an emailed invoice, can send payable.updated shortly after payable.created. payable.approval_reset and payable.payment.reversed are reserved. Cleo does not send them. For a payment that came back after the vendor was paid, subscribe to payment.returned.

Bank accounts

Contacts

Who receives each event

Each event goes to the business that created the resource, with one exception: payable.* events also go to the bill’s payer when the payer is a different business. The creator’s and the payer’s copies are separate events, with different ids and businessIds. Each is delivered only to the endpoints of its own business, and only when webhooks are on for that business. A vendor’s draft is not visible to the payer. The payer receives nothing for it until the vendor submits it, and then receives payable.created. New event types are added over time. Ignore types you do not recognize.

The request

Answer with any 2xx within 10 seconds, after you have stored the event. Do the work afterwards. A timeout, a connection error, a redirect or any other status counts as a failure.

Verify the signature

Always verify before you trust a delivery, against the raw request body:
  1. Split Cleo-Signature on commas into t and v1.
  2. Reject it if t is more than 300 seconds from your clock.
  3. Compute hex(HMAC-SHA256(secret, "${t}.${rawBody}")).
  4. Compare it with v1 in constant time.
A re-serialized body does not match, because key order and whitespace do not round-trip.

Retries and pausing

Delivery is at least once. A failed delivery is retried with exponential backoff starting at about 60 seconds, up to 10 attempts over about 8.5 hours. You may receive the same event more than once, so process each id once. Ordering is best effort. Use sequence to detect out-of-order events. Gaps in sequence are normal and do not mean you missed an event. Cleo pauses an endpoint after 20 deliveries in a row fail all their retries, or after 24 hours with no successful delivery. While paused, new events are not delivered and are not queued for later. The endpoint’s status becomes paused, and Cleo emails the business’s admins. Resume it with PATCH /v1/webhook-endpoints/{id} and {"enabled": true}, or in the web app.

The secret

  • Store it as a credential. Never log it or commit it.
  • If it leaks, rotate it with POST /v1/webhook-endpoints/{id}/rotate-secret. Rotation takes effect at once with no overlap, so a delivery in flight signed with the old secret fails verification.

Checklist

  • The endpoint is https://, public, and answers within 10 seconds.
  • You verify the signature on the raw body, with the 300-second window and a constant-time compare.
  • You process each event id once.
  • You tolerate gaps in sequence.
  • You fetch the resource with GET before acting on it.
  • A scheduled updatedSince poll backs up your webhooks. See Sync bills and payments.
  • You watch your endpoint’s failures. A paused endpoint misses events.