Webhook
Webhooks allow BillHive to send real-time notifications to your application when specific events occur in your account.
Overview
When an event is triggered in BillHive, a webhook sends an HTTP POST request to your configured endpoint with the event data. This enables you to automate workflows, sync data, and respond to changes instantly.
Setting Up Webhooks
To configure a webhook:
- Navigate to Settings > Webhooks in your BillHive dashboard.
- Click Add Webhook Endpoint.
- Enter your endpoint URL.
- Select the events you want to subscribe to.
- Save the configuration.
Supported Events
| Event | Description |
|---|---|
invoice.created | Triggered when a new invoice is created |
invoice.paid | Triggered when an invoice is paid |
subscription.created | Triggered when a new subscription is created |
subscription.cancelled | Triggered when a subscription is cancelled |
subscription.renewed | Triggered when a subscription is renewed |
payment.success | Triggered when a payment is successfully processed |
payment.failed | Triggered when a payment fails |
customer.created | Triggered when a new customer is created |
customer.updated | Triggered when customer details are updated |
Webhook Payload
Each webhook request includes a JSON payload with the following structure:
{
"event": "invoice.paid",
"timestamp": "2025-01-15T10:30:00Z",
"data": {
// Event-specific data
}
}Verifying Webhooks
To ensure the authenticity of incoming webhooks, BillHive includes a signature in the request headers. Verify this signature using your webhook secret before processing the payload.
Retry Policy
If your endpoint returns a non-2xx response, BillHive will retry the webhook delivery up to 5 times with exponential backoff.