Webhooks
Receive real-time notifications when events occur in your Rebased account.
How Webhooks Work
When something happens in Rebased (e.g., an invoice is created), we send an HTTP POST request to your specified URL with details about the event. Your server can then process this data automatically.
Creating a Webhook
- Go to Settings → Integrations in your Rebased account
- Click the Webhooks tab
- Click Create Webhook
- Enter a name and optional description
- Enter your destination URL (must be HTTPS in production)
- Select the events you want to receive
- Click Create Webhook
Your signing secret will be displayed once. Copy it immediately — you’ll need it to verify webhook signatures.
Available Events
| Event | Description |
|---|---|
invoice.created | Triggered when an invoice is created |
invoice.sent | Triggered when an invoice is sent or marked as sent |
invoice.paid | Triggered when an invoice is fully paid |
bill.created | Triggered when a bill is created |
bill.approved | Triggered when a bill is approved for payment |
contact.created | Triggered when a client or supplier is created (via UI or API) |
payment.received | Triggered when a payment is recorded |
Webhook Payload
Each webhook delivery includes:
{
"event_type": "invoice.created",
"event_id": "evt_abc123",
"timestamp": "2026-03-08T12:00:00Z",
"data": {
"id": "inv_xyz789",
"business_id": "bus_123",
// ... event-specific data
}
}Verifying Signatures
Every webhook request includes a signature header to verify it came from Rebased. Always verify signatures before processing webhooks.
Headers
| Header | Description |
|---|---|
X-Rebased-Event | The event type (e.g., invoice.created) |
X-Rebased-Delivery | Unique delivery ID |
X-Rebased-Timestamp | Unix timestamp of the request |
X-Rebased-Signature | HMAC-SHA256 signature |
Verification Example
import hmac
import hashlib
def verify_signature(payload, signature, timestamp, secret):
# Construct the signed payload
signed_payload = f"{timestamp}.{payload}"
# Calculate expected signature
expected = hmac.new(
secret.encode(),
signed_payload.encode(),
hashlib.sha256
).hexdigest()
# Compare signatures
return hmac.compare_digest(expected, signature)const crypto = require('crypto');
function verifySignature(payload, signature, timestamp, secret) {
const signedPayload = `${timestamp}.${payload}`;
const expected = crypto
.createHmac('sha256', secret)
.update(signedPayload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(signature)
);
}Managing Webhooks
Testing a Webhook
Click the Test button on any webhook to send a test event. This helps verify your endpoint is receiving and processing webhooks correctly.
Pausing a Webhook
If you need to temporarily stop receiving events:
- Find the webhook in Settings → Integrations → Webhooks
- Click the Pause button
Paused webhooks won’t receive events until resumed.
Rotating the Signing Secret
If your signing secret is compromised:
- Find the webhook in Settings → Integrations → Webhooks
- Click Rotate Secret
- Copy the new secret immediately
- Update your server with the new secret
The old secret is immediately invalidated.
Deleting a Webhook
- Find the webhook in Settings → Integrations → Webhooks
- Click the Delete button
- Confirm the action
Deleted webhooks cannot be restored.
Retry Policy
If your endpoint returns an error (non-2xx status code) or times out, we’ll retry the delivery:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 24 hours |
After 5 failed attempts, the delivery is marked as failed. You can manually retry failed deliveries from the webhook details page.
Best Practices
- Respond quickly — Return a 2xx response within 30 seconds
- Process asynchronously — Queue webhook data for background processing
- Verify signatures — Always verify the
X-Rebased-Signatureheader - Handle duplicates — Use the
X-Rebased-Deliveryheader to deduplicate - Use HTTPS — Production endpoints must use HTTPS
Who Can Manage Webhooks
Webhooks can be created and managed by:
- Business Admins — Full access to all integrations
- Advisors — Can manage integrations for client businesses they have access to
Team members with other roles cannot create or view webhooks.