Developer Integration

Real-time Webhook API Integration

Integrate Chatsvia with your existing systems. Receive real-time notifications for orders, messages, and conversations directly to your server.

What are Webhooks?

Automated Event Notifications

Webhooks are automated messages sent from Chatsvia to your server when specific events occur. Instead of constantly polling our API for updates, webhooks push data to you in real-time.

When a customer places an order through chat, sends a message, or any other event happens, Chatsvia immediately sends an HTTP POST request to your configured endpoint with all the relevant data.

Real-timeSecureReliable
How It Works
1

Event Occurs

Customer places an order via chat

2

Webhook Triggered

Chatsvia sends POST request to your URL

3

Process Data

Your server handles the order data

Events

Available Webhook Events

Subscribe to the events that matter to your business

order.created
Triggered when a new order is created through chat
order.updated
Triggered when an order status is updated
message.received
Triggered when a new message is received from customer
conversation.created
Triggered when a new conversation is started
Integration Guide

How to Integrate Webhooks

Follow these simple steps to start receiving webhook notifications

1

Create Webhook Endpoint

Set up an HTTP endpoint on your server that can receive POST requests from Chatsvia.

2

Configure in Dashboard

Go to Settings > Webhooks in your Chatsvia dashboard and add your endpoint URL.

3

Select Events

Choose which events you want to receive notifications for (orders, messages, etc.).

4

Verify & Test

Use the test feature to verify your endpoint is receiving webhooks correctly.

Payload Example

Webhook Payload Structure

Example of an order.created webhook payload

order.created
{
  "event": "order.created",
  "timestamp": "2026-01-31T10:30:00Z",
  "data": {
    "orderId": "ORD-2026-00123",
    "orderNumber": "00123",
    "status": "pending",
    "customer": {
      "name": "John Doe",
      "email": "[email protected]",
      "phone": "+1234567890",
      "address": "123 Main St, City, Country"
    },
    "items": [
      {
        "productId": "prod_123",
        "name": "Wireless Headphones",
        "quantity": 1,
        "price": 199.00,
        "variant": "Black"
      }
    ],
    "subtotal": 199.00,
    "shipping": 0,
    "total": 199.00,
    "currency": "USD",
    "source": {
      "type": "facebook",
      "accountId": "acc_456"
    },
    "createdAt": "2026-01-31T10:30:00Z"
  }
}
Security

Secure Webhook Delivery

We take security seriously. Every webhook is signed and delivered securely.

Signature Verification
Each webhook includes a signature header that you can verify to ensure authenticity.
HTTPS Required
All webhook endpoints must use HTTPS to ensure secure data transmission.
Retry Logic
Failed webhooks are automatically retried up to 3 times with exponential backoff.
Timeout Handling
Your endpoint should respond within 30 seconds to avoid timeout errors.
Signature Verification Example (Node.js)
JavaScript
const crypto = require('crypto');

function verifyWebhookSignature(payload, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  const expectedSignature = hmac
    .update(JSON.stringify(payload))
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expectedSignature)
  );
}

// Express.js example
app.post('/webhook', (req, res) => {
  const signature = req.headers['x-chatsvia-signature'];
  const isValid = verifyWebhookSignature(
    req.body,
    signature,
    process.env.WEBHOOK_SECRET
  );

  if (!isValid) {
    return res.status(401).json({ error: 'Invalid signature' });
  }

  // Process the webhook
  const { event, data } = req.body;

  switch (event) {
    case 'order.created':
      handleNewOrder(data);
      break;
    case 'order.updated':
      handleOrderUpdate(data);
      break;
    // ... handle other events
  }

  res.status(200).json({ received: true });
});
Use Cases

What Can You Build?

Webhooks enable powerful integrations with your existing systems

Sync Orders to ERP
Automatically sync new orders to your ERP or inventory management system.
CRM Integration
Update customer records in your CRM when new conversations or orders occur.
Shipping Automation
Trigger shipping label creation and tracking when orders are confirmed.
Analytics & Reporting
Send events to your analytics platform for real-time dashboards.
Team Notifications
Send Slack or email alerts when important events occur.
Custom Workflows
Build custom automation workflows with tools like Zapier or n8n.

Ready to Integrate?

Start receiving real-time webhook notifications for your Chatsvia account. Set up takes just a few minutes.