Webhooks
Receive real-time notifications for events happening in your Fixia account.
Introduction
Webhooks allow you to build integrations that react to events in Fixia. When an event occurs, we send an HTTP POST request to the URL you've configured.
Configuring Webhooks
You can configure your webhook endpoints in the Dashboard → Settings → Webhooks section. You'll need to provide:
- Endpoint URL: The public URL where you want to receive requests.
- Event Types: The specific events you want to be notified about.
- Secret: A signing secret used to verify that requests are coming from Fixia.
Verifying Signatures
Each webhook request includes an X-Webhook-Signature header. This is an HMAC SHA-256 signature generated using your webhook secret and the request body.
Security Best Practice
Always verify the signature before processing the webhook payload to ensure the request is legitimate.
javascript
const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
hmac.update(payload);
const digest = hmac.digest('hex');
return digest === signature;
}Event Types
The following events are currently supported:
contract.created: Triggered when a new contract is created.asset.updated: Triggered when an asset's status or details change.service_order.completed: Triggered when a service order is marked as finished.