# order.created

HTML: https://www.app2email.com/docs/api/webhooks/order.created · Index: https://www.app2email.com/docs/api/llms.txt

An order became real: placed to pay later, paid online, or confirmed on WhatsApp by a visitor of the order page. Not sent while an order still waits for its payment or its confirmation.

Group: Order-and-Pay. Header `X-App2email-Event: order.created`. Inside the envelope `{id, type, created, number, test?, data}` ([envelope, headers, signature](https://www.app2email.com/docs/api/webhooks.md)). Every webhook of the number gets every number event: filter by `type`.

## data

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data.reference` | string | yes | The order number people see, eg SO-K7M2QX. |
| `data.status` | string | yes | new = waiting for the business to accept it.; one of: `new`, `accepted`, `preparing`, `ready`, `out_for_delivery`, `completed`, `cancelled`, `rejected`, `expired` |
| `data.source` | string |  | one of: `web`, `chat`, `flow`, `counter`, `api` |
| `data.fulfilment` | string | yes | one of: `pickup`, `delivery` |
| `data.asap` | boolean |  | true = as soon as possible; false = the customer chose a time. |
| `data.due` | string |  | When the order is ready (pickup) or arrives (delivery). |
| `data.customer` | object |  |  |
| `data.customer.contact` | string |  | The customer's WhatsApp number (digits) or business-scoped user id. |
| `data.customer.verified` | boolean |  | true when the number is known to be the customer's (they wrote from it); false = typed on the order page. |
| `data.customer.name` | string |  |  |
| `data.customer.phone` | string |  |  |
| `data.customer.email` | string |  |  |
| `data.items` | object[] | yes |  |
| `data.items.item_id` | integer |  |  |
| `data.items.variant_id` | integer |  |  |
| `data.items.sku` | string |  |  |
| `data.items.name` | string |  |  |
| `data.items.variant` | string |  |  |
| `data.items.options` | string[] |  |  |
| `data.items.quantity` | integer |  |  |
| `data.items.unit_price` | number |  |  |
| `data.items.total` | number |  |  |
| `data.items.note` | string |  |  |
| `data.items_count` | integer |  |  |
| `data.currency` | string | yes |  |
| `data.subtotal` | number |  |  |
| `data.discount` | number |  |  |
| `data.discount_code` | string |  |  |
| `data.delivery_fee` | number |  |  |
| `data.fees` | number |  |  |
| `data.tip` | number |  |  |
| `data.tax` | number |  |  |
| `data.total` | number | yes |  |
| `data.total_label` | string |  |  |
| `data.refunded` | number |  |  |
| `data.payment` | object | yes |  |
| `data.payment.state` | string |  | authorised: the card is held (the shop charges only when it accepts the order, a per-shop setting); released: that hold was released, nothing was charged.; one of: `not_needed`, `on_pickup`, `on_delivery`, `pending`, `authorised`, `paid`, `part_refunded`, `refunded`, `released`, `failed` |
| `data.payment.method` | string |  | stripe, paypal, cash, card, or empty while nothing was paid. |
| `data.payment.payment_id` | integer |  | The id of the online payment (GET /payments/{id}). |
| `data.delivery` | object |  | null for a pickup. |
| `data.delivery.address` | string |  |  |
| `data.delivery.notes` | string |  |  |
| `data.delivery.postcode` | string |  |  |
| `data.delivery.method` | string |  |  |
| `data.delivery.zone` | string |  |  |
| `data.note` | string |  |  |
| `data.allergy_note` | string |  |  |
| `data.pickup_code` | string |  | The 4 characters the customer can say at the counter. |
| `data.created` | string | yes |  |
| `data.timestamp` | string |  |  |

## Samples

### pickup

```json
{
  "id": "evt_Shp3k9m2Lw8Rt5Yp1Zs01",
  "type": "order.created",
  "created": "2026-11-13T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "reference": "SO-K7M2QX",
    "status": "accepted",
    "source": "web",
    "fulfilment": "pickup",
    "asap": true,
    "due": "2026-11-13T01:20:00Z",
    "customer": {
      "contact": "61412345678",
      "verified": true,
      "name": "Sample Contact",
      "phone": "61412345678",
      "email": ""
    },
    "items": [
      {
        "item_id": 1,
        "variant_id": null,
        "sku": "",
        "name": "Margherita",
        "variant": "",
        "options": [
          "Large",
          "Olives"
        ],
        "quantity": 2,
        "unit_price": 14,
        "total": 28,
        "note": ""
      },
      {
        "item_id": 2,
        "variant_id": null,
        "sku": "",
        "name": "Cola",
        "variant": "",
        "options": [],
        "quantity": 1,
        "unit_price": 2.5,
        "total": 2.5,
        "note": ""
      }
    ],
    "items_count": 3,
    "currency": "USD",
    "subtotal": 30.5,
    "discount": 0,
    "discount_code": "",
    "delivery_fee": 0,
    "fees": 0,
    "tip": 0,
    "tax": 0,
    "total": 30.5,
    "total_label": "$30.50",
    "refunded": 0,
    "payment": {
      "state": "on_pickup",
      "method": "",
      "payment_id": null
    },
    "delivery": null,
    "note": "",
    "allergy_note": "",
    "pickup_code": "7KQ2",
    "created": "2026-11-13T01:00:00Z",
    "timestamp": "2026-11-13T01:00:00.000Z"
  }
}
```

## Caused by

- [Place an order for a customer](https://www.app2email.com/docs/api/order-and-pay/create-shop-order.md): `POST /v1/{number}/shop/orders`

Send it to your URL: https://www.app2email.com/docs/api/webhooks/tester?type=order.created
