Skip to content

6. Webhooks

Webhooks give you real-time updates: when an expense is reviewed or a supplier changes in Payhawk, Odoo is notified immediately instead of waiting for the 15-minute scheduled sync.

Enable webhooks in Odoo

  1. Settings → Payhawk → Miscellaneous tab.
  2. Turn on Enable Webhooks.
  3. A Webhook Secret (a UUID) is generated automatically. This secret is part of the webhook URL, so each company has a unique, unguessable endpoint.

Your webhook URL

The endpoint is:

https://<your-odoo-domain>/payhawk/webhooks/<webhook-secret>

For example:

https://erp.example.com/payhawk/webhooks/bd46acfc-f5ca-438f-bd2c-d871013f8b16

Register the URL in Payhawk

In Payhawk, add this URL as a webhook endpoint. The connector handles these events:

EventEffect in Odoo
expense.reviewedCreate/refresh the bill or receipt for the expense
expense.payment-details.updatedUpdate payment details on the linked move
supplier.createdImport the new supplier
supplier.updatedUpdate the matching supplier

How requests are authenticated

The secret in the URL is the authentication. An unknown secret is rejected with 401 Unauthorized. If webhooks are toggled off in Odoo, inbound calls return a disabled status and nothing is processed — so you can pause without removing the endpoint in Payhawk.

Keep the secret private

Anyone with the full webhook URL can post events to your Odoo. Treat it like a password. Toggling Enable Webhooks off and on regenerates behavior tied to the stored secret — coordinate with the Payhawk-side endpoint if you rotate it.

Next: Go live →

© PLANA Digital Ltd.