ElebneElebneDocs
Store API

Webhook Events

Order and product webhook events for the Store API. Receive real-time notifications for new orders, status changes, and stock alerts.

Webhook Events

The Store API dispatches webhook events for order lifecycle changes and stock alerts. Configure your webhook URL in the developer dashboard to start receiving events.

All webhook payloads are signed with HMAC-SHA256. See Webhooks for verification details.

Order events

order.new

Fired when a customer places a new order in your shop.

Recommended action: Display in your POS/dashboard, send to kitchen, start preparation timer.

{
  "event": "order.new",
  "timestamp": "2026-04-04T14:30:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "shopId": "6612f...",
    "shopName": "Restaurant Tata Aminata",
    "status": "NEW",
    "items": [
      {
        "productId": "6612f1a2b3c4d5e6f7890123",
        "name": "Thiéboudienne Royale",
        "quantity": 2,
        "price": 50000,
        "variant": { "label": "Grand", "priceAdjustment": 10000 },
        "options": [{ "name": "Sauce piquante", "priceAdjustment": 500 }]
      }
    ],
    "totalAmount": 121000,
    "customerPhone": "+22242345678",
    "customerName": "Aminata Diallo",
    "createdAt": "2026-04-04T14:30:00.000Z"
  }
}

order.accepted

Fired when the merchant accepts the order and begins preparation.

Recommended action: Update order status in your system, notify delivery team.

{
  "event": "order.accepted",
  "timestamp": "2026-04-04T14:32:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "status": "PREPARING",
    "previousStatus": "NEW"
  }
}

order.ready

Fired when the order is ready for pickup or delivery.

Recommended action: Notify delivery driver, send customer pickup notification.

{
  "event": "order.ready",
  "timestamp": "2026-04-04T15:00:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "status": "READY",
    "previousStatus": "PREPARING"
  }
}

order.delivered

Fired when delivery is confirmed.

Recommended action: Mark order complete in your system, trigger post-delivery workflow.

{
  "event": "order.delivered",
  "timestamp": "2026-04-04T15:30:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "status": "DELIVERED",
    "previousStatus": "PICKED_UP"
  }
}

order.cancelled

Fired when an order is cancelled by the merchant or customer.

Recommended action: Restore inventory, update POS, stop preparation.

{
  "event": "order.cancelled",
  "timestamp": "2026-04-04T14:35:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "status": "CANCELLED",
    "previousStatus": "NEW",
    "cancellationReason": "Ingrédients indisponibles"
  }
}

order.refunded

Fired when a refund is processed on an order (partial or full).

Recommended action: Update accounting, restore inventory if applicable.

{
  "event": "order.refunded",
  "timestamp": "2026-04-04T16:00:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "status": "REFUNDED",
    "amountRefunded": 50000,
    "totalAmountRefunded": 50000,
    "totalAmount": 121000
  }
}

order.modified

Fired when the customer accepts a merchant-proposed order modification.

Recommended action: Update order details in your system, adjust preparation.

{
  "event": "order.modified",
  "timestamp": "2026-04-04T14:45:00.000Z",
  "sandbox": false,
  "data": {
    "referenceNumber": "EL-3XXXXXXXXXXXXXX",
    "previousTotalAmount": 121000,
    "newTotalAmount": 100000,
    "modifiedItems": [
      { "productId": "6612f...", "name": "Thiéboudienne Royale", "quantity": 1 }
    ]
  }
}

Product events

product.stock_low

Fired when a product's stock drops below the low-stock threshold (default: 5 units).

Recommended action: Trigger reorder, notify inventory manager, update POS display.

{
  "event": "product.stock_low",
  "timestamp": "2026-04-04T14:30:00.000Z",
  "sandbox": false,
  "data": {
    "productId": "6612f1a2b3c4d5e6f7890123",
    "externalId": "THIEB-001",
    "name": "Thiéboudienne Royale",
    "quantity": 3,
    "lowStockThreshold": 5,
    "shopId": "6612f..."
  }
}

product.stock_out

Fired when a product's stock reaches zero.

Recommended action: Remove from active menu/display, trigger urgent reorder, disable product.

{
  "event": "product.stock_out",
  "timestamp": "2026-04-04T16:00:00.000Z",
  "sandbox": false,
  "data": {
    "productId": "6612f1a2b3c4d5e6f7890123",
    "externalId": "THIEB-001",
    "name": "Thiéboudienne Royale",
    "quantity": 0,
    "shopId": "6612f..."
  }
}

Event summary

EventWhen it firesKey data
order.newCustomer places orderFull order with items, customer info, total
order.acceptedMerchant acceptsReference number, new status
order.readyOrder ready for pickup/deliveryReference number, new status
order.deliveredDelivery confirmedReference number, new status
order.cancelledOrder cancelledReference number, cancellation reason
order.refundedRefund processedReference number, refund amounts
order.modifiedModification acceptedReference number, old/new totals, modified items
product.stock_lowStock below thresholdProduct ID, current quantity, threshold
product.stock_outStock reaches 0Product ID, external ID

Testing with sandbox

Use the simulate order endpoint to generate order.new webhook events in sandbox mode. All simulated events include "sandbox": true in the payload.

curl -X POST https://api.elebne.ai/api/v1/dev/store/orders/simulate \
  -H "Authorization: Bearer sk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [{ "productId": "6612f...", "quantity": 1 }],
    "customerName": "Test Customer"
  }'

Next steps

  • Webhooks -- configure webhook URLs and verify signatures
  • Orders -- read order details after receiving events
  • Inventory -- restock products after stock alerts

Was this page helpful?

On this page