New Order Webhook
Triggered on successful creation of a new order. This means the order has been validated and the payment has cleared, and now the site owner can accept or cancel the order.
Permissions
This webhook requires the Read Orders permission scope.
Event Body
Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
NAME
TYPE
DESCRIPTION
Unique event ID.
Expected wix.restaurants.v3.order
.
Fully Qualified Domain Name.
Expected new_order
.
Event name.
Event Info
NewOrder ID associated with this event.
Event timestamp.
Whether this event was triggered as a result of a privacy regulation application (e.g., GDPR).
If present, indicates the action that triggered the event.
Was this helpful?
The data payload will include the following as an encoded JWT:
Event Body
json
1{2 "data": {3 "eventType": "wix.restaurants.v3.order_new_order",4 "instanceId": "<app-instance-id>",5 "data": "<stringified-JSON>"6 }7}
The parsed data
will include:
Sample Data
json
1{2 "id" : "52269077-05f2-4b59-ba4f-36ef8c4c1e11",3 "entityFqdn" : "wix.restaurants.v3.order",4 "slug" : "new_order",5 "actionEvent" : {6 "bodyAsJson" : {7 "order" : {8 "id" : "64783425355",9 "createdDate" : "2021-07-07T10:37:44.994Z",10 "updatedDate" : "2021-07-07T10:39:46.994Z",11 "comment" : "No peanuts please",12 "currency" : "USD",13 "status" : "NEW",14 "lineItems" : [ {15 "quantity" : 5,16 "price" : "2.00",17 "comment" : null,18 "dishOptions" : [ {19 "name" : "Taco Options",20 "minChoices" : 0,21 "maxChoices" : 3,22 "type" : "EXTRAS",23 "availableChoices" : [ {24 "itemId" : "2b5131cd-7872-4ee8-ae40-cb00c6dcaec1",25 "price" : "1.00"26 }, {27 "itemId" : "d5e1b8f4-f18e-4fba-8ef4-33ad632b6c40",28 "price" : "1.50"29 }, {30 "itemId" : "0f3fee4d-1b4a-4cfd-9c79-11a52e8e4024",31 "price" : "1.50"32 } ],33 "defaultChoices" : [ ],34 "selectedChoices" : [ {35 "quantity" : 1,36 "price" : "1.50",37 "comment" : null,38 "dishOptions" : [ ],39 "catalogReference" : {40 "catalogItemId" : "d5e1b8f4-f18e-4fba-8ef4-33ad632b6c40",41 "catalogItemName" : "Fried Beans",42 "catalogItemDescription" : null,43 "catalogItemMedia" : null44 }45 } ]46 } ],47 "catalogReference" : {48 "catalogItemId" : "81cddf94-dcad-4f0e-9c3c-7556e3dbd4d8",49 "catalogItemName" : "Chicken Taco",50 "catalogItemDescription" : "with fresh veggies and Roasted Tomato Salsa",51 "catalogItemMedia" : "https://static.wixstatic.com/media/11062bA4cabfdc2652413d92990cfac29777cc~mv2.jpg"52 }53 } ],54 "discounts" : [ {55 "catalogDiscountId" : "bc697347-c180-494b-b68d-bc63ac63a84b",56 "appliedAmount" : "15.00",57 "catalogDiscountType" : "OFF_ORDER",58 "catalogDiscountName" : "Sunday Order Discount"59 } ],60 "payments" : [ {61 "type" : "CASH",62 "amount" : "10.00",63 "method" : "offline",64 "providerTransactionId" : "d9ef0f0c-e81a-4017-9d6a-977089eb411f"65 } ],66 "fulfillment" : {67 "type" : "DELIVERY",68 "promisedTime" : "2021-07-07T11:17:44.994Z",69 "asap" : true,70 "deliveryDetails" : {71 "charge" : "0.00",72 "address" : {73 "formatted" : "235 W 23rd St, New York, NY 10011, United States",74 "country" : null,75 "city" : "New York",76 "street" : "West 23rd Street",77 "streetNumber" : "235",78 "apt" : "1",79 "floor" : "3",80 "entrance" : null,81 "zipCode" : "10011-2302",82 "countryCode" : "US",83 "onArrival" : "UNSPECIFIED_ON_ARRIVAL_TYPE",84 "approximate" : false,85 "comment" : null,86 "location" : {87 "latitude" : 40.7448484,88 "longitude" : -73.996749889 },90 "addressLine2" : null91 }92 }93 },94 "customer" : {95 "firstName" : "John",96 "lastName" : "Smith",97 "phone" : "2075556300",98 "email" : "john@example.com",99 "contactId" : "8046df3c-7575-4098-a5ab-c91ad8f33c47"100 },101 "totals" : {102 "subtotal" : "10.00",103 "total" : "10.00",104 "delivery" : null,105 "tax" : null,106 "discount" : null,107 "loyaltySavings" : null,108 "quantity" : 1,109 "tip" : null110 },111 "activities" : [ {112 "timestamp" : "2021-07-07T10:37:44.994Z",113 "message" : "new"114 }, {115 "timestamp" : "2021-07-07T10:39:46.994Z",116 "message" : "accepted []"117 } ],118 "channelInfo" : {119 "type" : "WEB"120 },121 "coupon" : null,122 "loyaltyInfo" : null123 }124 }125 },126 "entityId" : "64783425355",127 "eventTime" : "2021-07-07T10:47:44.994Z",128 "triggeredByAnonymizeRequest" : false129}