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

1

Create an endpoint URL

Set up a public HTTPS endpoint on your server that can receive POST requests with a JSON payload.

2

Configure in dashboard

Go to your SaleviaCon dashboard and add your endpoint URL under Settings → Webhooks. Select which events to subscribe to.

3

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.

EventDescription
order.createdNew order placed
order.updatedOrder status changed
order.paidPayment received
cart.abandonedCart abandoned
customer.createdNew customer added
broadcast.sentBroadcast sent
message.deliveredMessage 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:

Payload
{
  "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.

Verification example (Node.js)
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:

Attempt 15 minutes
Attempt 230 minutes
Attempt 32 hours

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 →