Webhooks

Event Reference

Reference for the public webhook events delivered to plugin endpoints.

Whatalo currently delivers 10 public webhook events. Declare only the events your plugin actually handles in your whatalo.app.ts manifest.

Subscribing to Events

// whatalo.app.ts
webhooks: [
  { event: "order.created", description: "Track new orders for fulfilment" },
  { event: "order.updated", description: "Sync order changes" },
  { event: "product.updated", description: "Sync catalog changes" },
  { event: "checkout.completed", description: "React to completed checkouts" },
],

The description field is optional but recommended because it appears on the merchant's install permission screen.

Event Headers

The event name is delivered in X-Webhook-Event. The JSON body contains event-specific data and does not include an event field.

For order, customer, and product events, event_id is the public identifier of the affected entity and matches the nested order.id, customer.id, or product.id. Use the delivery header X-Webhook-Id for per-delivery idempotency.

Order Events

EventTrigger
order.createdA new order is placed
order.updatedAn order's details, status, or payment status changes
order.cancelledAn order is cancelled
order.completedAn order is completed

Example: order.created

{
  "event_id": "ord_abc123",
  "occurred_at": "2026-03-01T14:30:00.000Z",
  "order": {
    "id": "ord_abc123",
    "status": "pending",
    "total": 1500.5,
    "currency": "DOP",
    "shipping_address": {
      "address": "Calle 1 #2",
      "city": "Santo Domingo",
      "province": "Distrito Nacional",
      "country": "República Dominicana",
      "postal_code": "10101"
    },
    "items": [
      {
        "product_id": "prd_abc123",
        "product_name": "Starter Kit",
        "variant_name": "Color: Rojo",
        "quantity": 2,
        "unit_price": 750.25,
        "total_price": 1500.5
      }
    ]
  },
  "customer": {
    "id": "cus_abc123",
    "name": "Ana Perez"
  },
  "store": {
    "id": "sto_abc123",
    "name": "My Store",
    "timezone": "America/Santo_Domingo"
  }
}

Product Events

EventTrigger
product.createdA product is created
product.updatedA product's details change
product.deletedA product is deleted

Example: product.updated

{
  "event_id": "prd_abc123",
  "occurred_at": "2026-03-01T14:30:00.000Z",
  "product": {
    "id": "prd_abc123",
    "name": "Starter Kit",
    "price": 1500.5
  },
  "store": {
    "id": "sto_abc123",
    "timezone": "America/Santo_Domingo"
  }
}

Customer Events

EventTrigger
customer.createdA customer is created
customer.updatedA customer's profile changes

Example: customer.created

{
  "event_id": "cus_abc123",
  "occurred_at": "2026-03-01T14:30:00.000Z",
  "customer": {
    "id": "cus_abc123",
    "name": "Ana Perez",
    "phone": "8090000000"
  },
  "store": {
    "id": "sto_abc123",
    "timezone": "America/Santo_Domingo"
  }
}

Checkout Events

EventTrigger
checkout.completedA checkout flow completes
checkout.abandonedA checkout draft is marked abandoned after inactivity

Checkout payloads include the fields available for that checkout event. Treat unknown fields as additive and ignore fields your plugin does not need.

For checkout.abandoned, event_id matches the nested checkout.id, the customer object has no id (the draft is pre-customer, contact fields only), and checkout.recovery_url links back to the shopper's cart.

CLI Test Support

The whatalo webhook trigger CLI command supports local testing for these public events:

CLI ConstantWebhook Event
ORDER_CREATEDorder.created
ORDER_UPDATEDorder.updated
ORDER_CANCELLEDorder.cancelled
PRODUCT_CREATEDproduct.created
PRODUCT_UPDATEDproduct.updated
PRODUCT_DELETEDproduct.deleted
CUSTOMER_CREATEDcustomer.created
CUSTOMER_UPDATEDcustomer.updated
CHECKOUT_COMPLETEDcheckout.completed
whatalo webhook trigger ORDER_CREATED --store my-dev-store

On this page