Webhook Events
Receive real-time HTTP notifications when events happen in your SaleviaCon account. Webhooks let you build custom integrations without polling or manual checks.
Three steps to receive webhooks
Create an endpoint URL
Set up a public HTTPS endpoint on your server that can receive POST requests with a JSON payload.
Configure in dashboard
Go to your SaleviaCon dashboard and add your endpoint URL under Settings → Webhooks. Select which events to subscribe to.
Receive POST requests
SaleviaCon sends HTTP POST requests with event data to your endpoint in real time as events occur.
Available Webhook Events
Subscribe to any combination of the following events from your dashboard.
| Event | Description |
|---|---|
order.created | New order placed |
order.updated | Order status changed |
order.paid | Payment received |
cart.abandoned | Cart abandoned |
customer.created | New customer added |
broadcast.sent | Broadcast sent |
message.delivered | Message delivered |
Example Payload
Every webhook POST includes a JSON body with an event type, a timestamp, and a data object containing the event-specific payload. Below is an example for order.created:
{
"event": "order.created",
"id": "evt_9xK2mR4pQw",
"timestamp": "2026-07-22T14:30:00Z",
"data": {
"order": {
"id": "ord_2aK3bL8mN",
"customer": {
"id": "cus_5xR7tP2qW",
"name": "Ahmed Khan",
"phone": "+923001234567"
},
"items": [
{
"product_id": "prod_9yU1iK4jH",
"name": "Premium Leather Bag",
"qty": 1,
"price": 4500,
"currency": "PKR"
}
],
"total": 4500,
"currency": "PKR",
"status": "pending",
"shipping_address": {
"city": "Karachi",
"country": "PK"
},
"created_at": "2026-07-22T14:30:00Z"
}
}
}Signature Verification
Every webhook request includes an X-Webhook-Signature header. SaleviaCon signs each payload using HMAC-SHA256 with your unique webhook secret. Always verify the signature before processing the payload.
import crypto from 'node:crypto';
const secret = 'whsec_your_secret_key';
const signature = req.headers['x-webhook-signature'];
const payload = JSON.stringify(req.body);
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
if (signature !== expected) {
throw new Error('Invalid webhook signature');
}Your webhook secret is generated when you create a webhook endpoint in the dashboard. Keep it secret and rotate it periodically.
Automatic Retries
If your endpoint does not respond with a 2xx status code within 10 seconds, SaleviaCon will retry the delivery up to 3 timesusing exponential backoff:
After 3 failed attempts, the event is discarded and logged in your webhook delivery history for troubleshooting. You can manually replay failed deliveries from the dashboard.
Start Receiving Webhooks
Configure your webhook endpoints in the SaleviaCon dashboard and start building real-time integrations.
Configure Webhooks →