Skip to content
Glossary

Webhook

Definition

A webhook is an HTTP request that one system sends automatically to a URL you choose when a specific event happens, such as a journal entry being posted. Instead of your application asking the accounting system every few minutes whether something changed, the accounting system tells your application the moment it does.

How it works

You register an endpoint URL and the events you care about. When the event fires, the sender POSTs a JSON payload describing it. Your endpoint should answer quickly with a 2xx status and do heavy work in the background.

Ledgeriano sends webhooks for events such as entry.posted, stock_document.posted, stock_document.cancelled, production_order.closed and costing.run_posted, and signs each delivery with HMAC SHA-256 in the X-Webhook-Signature header. Compute the HMAC of the raw request body with your webhook secret and compare it in constant time before trusting the payload.

Design the receiver to tolerate repeats and out-of-order deliveries: store the event ID and ignore one you have already processed. The accounting API guide includes a signature check you can copy.

Example: syncing posted entries to a data warehouse

A group wants every posted entry in its reporting warehouse. It registers https://reports.example.com/hooks/ledger for entry.posted. When an accountant posts entry 1207, the endpoint receives the payload within seconds, verifies the signature, writes the lines to the warehouse and answers 200.

FAQ

Questions about Webhook

What is the difference between a webhook and an API?

With an API your system asks for data when it wants it. With a webhook the other system pushes data to you when an event happens. Most integrations use both: webhooks for notification, the API to fetch details or write back.

What happens if my endpoint is down?

Delivery fails and depends on the sender's retry policy. Build your receiver to be idempotent and, after an outage, reconcile through the API so no event is missed.

Put the terms to work

Post a balanced entry, run a trial balance and close a year in a real ledger. New accounts get free credits to get started.