Skip to main content

Event Payload Examples

EasyConfirm fires webhooks for orders created via the Public API (POST /api/v1/orders). Below are example payloads for each event.

order.created

Fired after a new order is created and the WhatsApp template message is sent to the customer successfully.

{
"event": "order.created",
"timestamp": "2026-01-15T10:00:00.000Z",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalOrderId": "EO-12345",
"status": "pending",
"customerAction": null,
"deliveryStatus": null,
"customerName": "Ahmed Mohamed",
"customerPhone": "201234567890",
"customerAddress": "15 Tahrir St, Cairo",
"subtotal": 150,
"shippingCost": 25,
"totalCost": 175,
"currency": "EGP",
"failureReason": null,
"items": [
{
"id": "item-uuid-1",
"productName": "iPhone Case",
"variantName": "Black / Large",
"quantity": 2,
"unitPrice": 75,
"totalPrice": 150
}
],
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:00:00.000Z"
}
}

order.confirmed

Fired when the customer taps the Approve button on the WhatsApp confirmation message.

{
"event": "order.confirmed",
"timestamp": "2026-01-15T10:05:30.000Z",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalOrderId": "EO-12345",
"status": "confirmed",
"customerAction": "approved",
"deliveryStatus": "read",
"customerName": "Ahmed Mohamed",
"customerPhone": "201234567890",
"customerAddress": "15 Tahrir St, Cairo",
"subtotal": 150,
"shippingCost": 25,
"totalCost": 175,
"currency": "EGP",
"failureReason": null,
"items": [
{
"id": "item-uuid-1",
"productName": "iPhone Case",
"variantName": "Black / Large",
"quantity": 2,
"unitPrice": 75,
"totalPrice": 150
}
],
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:05:30.000Z"
}
}

order.canceled

Fired when the customer taps the Cancel button on WhatsApp, or the order is canceled via the API.

{
"event": "order.canceled",
"timestamp": "2026-01-15T10:05:30.000Z",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalOrderId": "EO-12345",
"status": "canceled",
"customerAction": "canceled",
"deliveryStatus": "read",
"customerName": "Ahmed Mohamed",
"customerPhone": "201234567890",
"customerAddress": "15 Tahrir St, Cairo",
"subtotal": 150,
"shippingCost": 25,
"totalCost": 175,
"currency": "EGP",
"failureReason": null,
"items": [
{
"id": "item-uuid-1",
"productName": "iPhone Case",
"variantName": "Black / Large",
"quantity": 2,
"unitPrice": 75,
"totalPrice": 150
}
],
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:05:30.000Z"
}
}

order.failed

Fired when the WhatsApp message delivery fails (e.g., invalid phone number, Meta API error).

{
"event": "order.failed",
"timestamp": "2026-01-15T10:01:00.000Z",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalOrderId": "EO-12345",
"status": "failed",
"customerAction": null,
"deliveryStatus": "failed",
"customerName": "Ahmed Mohamed",
"customerPhone": "201234567890",
"customerAddress": "15 Tahrir St, Cairo",
"subtotal": 150,
"shippingCost": 25,
"totalCost": 175,
"currency": "EGP",
"failureReason": "Recipient phone number not in allowed list",
"items": [
{
"id": "item-uuid-1",
"productName": "iPhone Case",
"variantName": "Black / Large",
"quantity": 2,
"unitPrice": 75,
"totalPrice": 150
}
],
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-15T10:01:00.000Z"
}
}

:::note Key Differences Between Events

  • order.created: status is pending, customerAction and deliveryStatus are null
  • order.confirmed: status is confirmed, customerAction is approved
  • order.canceled: status is canceled, customerAction is canceled
  • order.failed: status is failed, failureReason contains the error message :::