πŸ›’ Order Created Webhook (Inbound to Blend)

🧾 Description

This document describes the order_created event that delivery platforms send to Blend's webhook
when a customer places an order through the delivery app.

Blend receives this order data and processes it internally to show it in the merchant dashboard, kitchen system, etc.


πŸ” Direction

Delivery App β†’ Blend

Blend provides the delivery partner with a unique webhook URL to send order creation events to.


🌐 Webhook Endpoint

Blend will provide the delivery partner with a secure HTTP(S) webhook URL.
This is typically shared during onboarding

Example:

POST https://api-staging.tryblend.net/webhooks/order-receive

🧩 JSON Payload Example

{
  "event": "order_created",
  "event_time": "2025-01-01 00:00:00",
  "branch_id": "14589",
  "payload": {
    "id": "order_id",
    "payment_method": "cash", // any string u have 
    "order_type": "DELIVERY", // DINE-IN , PICK-UP
    "note": "",
    "subtotal": 50,
    "tax": 10,
    "discount": 10,
    "total": 50,
    "items": [
      {
        "id": "1",
        "quantity": 2,
        "price": 25, // per unit
        "note": "",
        "options": [
          {
            "id": "1",
            "price": 10, // per unit
            "quantity": 2
          }
        ]
      },
      {
        "id": "2",
        "quantity": 1,
        "price": 25,
        "note": "",
        "options": []
      }
    ]
  }
}

πŸ—‚ Field Descriptions

FieldDescription
eventAlways "order_created"
event_timeISO timestamp when the order was placed
branch_idID of the branch receiving the order
payload.idUnique order ID
payload.payment_method"cash", "card", or other values
payload.order_type"DELIVERY", "DINE-IN", or "PICK-UP"
payload.noteOptional customer notes
payload.subtotalTotal before tax and discounts
payload.taxTax applied
payload.discountDiscount applied
payload.totalFinal total after tax/discounts
payload.items[]List of items in the order
items[].idItem ID
items[].quantityQuantity ordered
items[].priceUnit price of item (including options)
items[].noteOptional notes per item
items[].options[]Toppings, extras, or modifications
options[].idID of the selected option
options[].pricePrice per unit of the option
options[].quantityQuantity of the option selected

🧠 Behavior

  • Blend uses the branch_id to route the order to the correct user
  • The order is validated and saved

βœ… Notes

  • This is a one-way inbound event to Blend from the delivery partner
  • Delivery platforms should retry in case of non-200 OK response
  • Order ID should be globally unique per partner
  • Blend will handle mapping between delivery item IDs and internal products


πŸ”„ Blend Webhook Response

After processing the order, Blend will respond to the delivery platform with a JSON response.

βœ… Success Response

{
  "order_id": "55",
  "status": "success"
}
  • order_id: The internal Blend order ID assigned after saving
  • status: Always "success" if the order was processed without issues

❌ Failed Response

{
  "order_id": "",
  "status": "failed"
}
  • order_id: Empty string indicates the order was not saved
  • status: "failed" indicates there was a problem with validation or saving the order

πŸ“Œ Notes

  • Delivery platforms should treat "success" as confirmation the order was received and stored by Blend
  • On "failed" response, the delivery platform may retry or alert their support team depending on policy