Webhook Service
The Webhook service handles outbound webhook delivery and external system integrations. It receives events from other tenant services via RabbitMQ and delivers them to configured external endpoints.
Architecture
Other Tenant Services
│ (RabbitMQ events)
▼
Webhook Backend (Laravel 12)
│
├──▶ PostgreSQL (webhook schema)
├──▶ Redis (rate limiting, retry scheduling)
├──▶ RabbitMQ (event consumption)
└──▶ External APIs (HTTP delivery)
Key Features
Webhook Management
- Configure webhook endpoints per event type
- Custom HTTP headers and authentication
- Payload transformation and filtering
- Enable/disable individual webhooks
Reliable Delivery
- Automatic retry with exponential backoff
- Configurable retry count and intervals
- Dead letter queue for permanently failed deliveries
- Delivery logging and debugging
Security
- HMAC signature verification (SHA-256)
- Custom secret per webhook endpoint
- IP allowlisting (optional)
- TLS verification enforcement
API Endpoints
Base URL: https://{tenant}.vecton.hu/api/webhooks (production) | http://localhost:8013/api (dev)
| Method | Endpoint | Description |
|---|---|---|
| GET | /webhooks | List configured webhooks |
| POST | /webhooks | Create webhook endpoint |
| PUT | /webhooks/{id} | Update webhook |
| DELETE | /webhooks/{id} | Delete webhook |
| GET | /webhooks/{id}/deliveries | Delivery history |
| POST | /webhooks/{id}/test | Send test payload |
| GET | /events | List available event types |
Webhook Configuration Example
{
"url": "https://external-system.com/webhook",
"events": ["order.created", "order.status_changed"],
"secret": "your-signing-secret",
"headers": {
"X-Custom-Header": "value"
},
"active": true,
"retry_count": 5
}
Delivery Payload
{
"id": "evt_abc123",
"event": "order.created",
"timestamp": "2026-02-16T12:00:00Z",
"tenant": "tenant-name",
"data": {
"order_id": 12345,
"total": 15000,
"currency": "HUF"
},
"signature": "sha256=abc123..."
}
Supported Events
All events from other tenant services can be forwarded:
| Source | Events |
|---|---|
| Webshop | order.created, order.status_changed, product.created, product.updated |
| Warehouse | stock.received, stock.low, stock.adjusted |
| CRM | customer.created, customer.updated, campaign.sent |
| Analytics | report.generated |
Database Schema
| Table | Description |
|---|---|
webhooks | Webhook endpoint configurations |
webhook_events | Event type subscriptions per webhook |
deliveries | Delivery attempts and results |
dead_letters | Permanently failed deliveries |
Configuration
| Variable | Description | Default |
|---|---|---|
APP_URL | Service base URL | http://localhost:8013 |
DB_SCHEMA | Database schema | webhook |
WEBHOOK_TIMEOUT | HTTP request timeout (seconds) | 30 |
WEBHOOK_MAX_RETRIES | Maximum retry attempts | 5 |
Development
cd tenant/tenant-backend-webhook
composer install
php artisan migrate --seed
php artisan serve --port=8013