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
- Settings → Payhawk → Miscellaneous tab.
- Turn on Enable Webhooks.
- 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-d871013f8b16Register the URL in Payhawk
In Payhawk, add this URL as a webhook endpoint. The connector handles these events:
| Event | Effect in Odoo |
|---|---|
expense.reviewed | Create/refresh the bill or receipt for the expense |
expense.payment-details.updated | Update payment details on the linked move |
supplier.created | Import the new supplier |
supplier.updated | Update 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 →