‹ Vantemo Docs
Webhooks

Webhooks Overview

Subscribe to platform events with HMAC-signed payloads and automatic retry.

Webhooks

Vantemo webhooks notify your application in real-time when events happen in your store. Instead of polling the API for changes, register a webhook endpoint and we'll send you HTTP POST requests with event payloads.

How It Works

  1. Register an endpoint — Provide a URL and choose which events to subscribe to
  2. Receive events — When an event occurs, we POST a JSON payload to your URL
  3. Verify the signature — Validate the HMAC signature to ensure authenticity
  4. Respond with 2xx — Acknowledge receipt within 30 seconds

Event Types

EventDescription
order.createdA new order was placed
order.updatedAn order's status or details changed
order.cancelledAn order was cancelled
order.fulfilledAn order was marked as shipped/delivered
product.createdA new product was created
product.updatedA product was modified
product.deletedA product was archived or deleted
customer.createdA new customer account was created
customer.updatedA customer's profile was updated
inventory.depletedA variant's stock reached zero
checkout.completedA checkout session was successfully completed
cart.abandonedA cart was abandoned (no checkout within threshold)

Payload Format

All webhook payloads follow the same envelope:

Webhook payload
{
  "id": "evt_1a2b3c4d",
  "type": "order.created",
  "createdAt": "2026-02-28T10:30:00.000Z",
  "data": {
    "id": "ord_9x8y7z",
    "status": "CONFIRMED",
    "total": 17160,
    "currency": "EUR",
    "customerEmail": "[email protected]"
  }
}

Signature Verification

Every webhook request includes an X-Vantemo-Signature header containing an HMAC-SHA256 signature. Verify it to ensure the payload wasn't tampered with:

Verify webhook signature
import crypto from 'node:crypto';

function verifyWebhookSignature(
  payload: string,
  signature: string,
  secret: string
): boolean {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload, 'utf-8')
    .digest('hex');

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

// In your webhook handler:
app.post('/webhooks/vantemo', (req, res) => {
  const signature = req.headers['x-vantemo-signature'] as string;
  const isValid = verifyWebhookSignature(
    JSON.stringify(req.body),
    signature,
    process.env.WEBHOOK_SECRET!
  );

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

  // Process the event
  const { type, data } = req.body;
  console.log(`Received ${type}:`, data);

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

Retry Policy

If your endpoint doesn't respond with a 2xx status code within 30 seconds, we retry with exponential backoff:

AttemptDelay
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry12 hours
6th retry24 hours
7th retry48 hours

After 7 failed attempts (approximately 72 hours), the webhook delivery is marked as permanently failed. You can view failed deliveries in the admin dashboard.

Best Practices

  1. Respond quickly — Return 200 immediately and process the event asynchronously. Don't do heavy processing in the webhook handler.
  2. Handle duplicates — Use the event id to deduplicate. Webhooks may be delivered more than once in rare cases.
  3. Verify signatures — Always validate the HMAC signature before processing.
  4. Use HTTPS — Webhook endpoints must use HTTPS in production.
  5. Monitor failures — Check the admin dashboard for failed deliveries and fix endpoint issues promptly.

Creating a Webhook Endpoint

Via API

curl
curl -X POST https://your-shop.vantemo.com/v1/webhooks/endpoints \
  -H "Authorization: Bearer vt_sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.myapp.com/webhooks/vantemo",
    "enabledEvents": ["order.created", "inventory.depleted"]
  }'

Via Admin Dashboard

  1. Navigate to Settings → Webhooks
  2. Click Add Endpoint
  3. Enter your URL and select event types
  4. Copy the signing secret

Next Steps

On this page