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.