But @Bryan-Square, it’s none sense, we monitor webhooks for create, updates and fulfillment_update to keep in our CRM whatever our customers do in Square. Still, every time an order is created in Square we get 1 created webhook, 3 updates and 3 fulfillment_updates webhooks, all at the same time and not logical order, usually we get an update and filfillment_update webhooks before the created webhook. And it seems the versions has nothing to do with the Customer actions, how can there be all those verions 1, 2, 3, etc when 1 order is created if the customer did not more actions? Why versions without the customer doing changes? all payloads are the same. Every time we get any webhook the CRM pulls the order payload immediately but there are no changes. Next I’m including the payloads we got on each of these webhooks and using a code compare plugin shows both matching:
For BTQFsU7kwgJCu00974Dz12QyCSjlahgjJHnHUv5mvMI
this is the order payload pulled at that time:
{
"order":{
"id":"tNGQNRAPcPGgq73JHq9PTDg6yvFZY",
"location_id":"LXE4FC194XMVZ",
"line_items":[
{
"uid":"NX4ZN19in1pAot0fvMmO8",
"catalog_object_id":"XOZHBXAROPXGWEI3YBRPWHZ4",
"catalog_version":1700174136440,
"quantity":"1",
"name":"Cherry Pie",
"variation_name":"9 inch",
"base_price_money":{
"amount":2600,
"currency":"USD"
},
"gross_sales_money":{
"amount":2600,
"currency":"USD"
},
"total_tax_money":{
"amount":0,
"currency":"USD"
},
"total_discount_money":{
"amount":260,
"currency":"USD"
},
"total_money":{
"amount":2340,
"currency":"USD"
},
"variation_total_price_money":{
"amount":2600,
"currency":"USD"
},
"applied_discounts":[
{
"uid":"mDkEL2vlV3clDY2LbEZlrC",
"discount_uid":"6556eb00b8a66",
"applied_money":{
"amount":260,
"currency":"USD"
}
}
],
"item_type":"ITEM",
"total_service_charge_money":{
"amount":0,
"currency":"USD"
}
}
],
"discounts":[
{
"uid":"6556eb00b8a66",
"name":"Discount: Coupon PIES23",
"amount_money":{
"amount":260,
"currency":"USD"
},
"applied_money":{
"amount":260,
"currency":"USD"
},
"type":"FIXED_AMOUNT",
"scope":"LINE_ITEM"
}
],
"fulfillments":[
{
"uid":"vyysEynWxh3FS4dn4ai8cD",
"type":"PICKUP",
"state":"PROPOSED",
"pickup_details":{
"pickup_at":"2023-11-23T20:00:00.000Z",
"note":"",
"placed_at":"2023-11-17T04:24:34.008Z",
"schedule_type":"SCHEDULED",
"recipient":{
"display_name":"Marilynn Tham",
"email_address":"[email protected]",
"phone_number":"+14156998542",
"address":{
"address_line_1":"1820 Solano Ave",
"locality":"Berkeley",
"administrative_district_level_1":"CA",
"postal_code":"94707",
"country":"US",
"organization":"Lavender Bakery & Cafe'"
}
},
"prep_time_duration":"PT0S"
},
"line_item_application":"ALL"
}
],
"created_at":"2023-11-17T04:24:32.844Z",
"updated_at":"2023-11-17T04:24:34.009Z",
"state":"OPEN",
"version":3,
"reference_id":"11ee850054142be8b9beac1f6bbba828",
"total_tax_money":{
"amount":0,
"currency":"USD"
},
"total_discount_money":{
"amount":260,
"currency":"USD"
},
"total_tip_money":{
"amount":260,
"currency":"USD"
},
"total_money":{
"amount":2600,
"currency":"USD"
},
"tenders":[
{
"id":"B4W9AgwsF4jDDYNkJOQwBVgzH98YY",
"location_id":"LXE4FC194XMVZ",
"transaction_id":"tNGQNRAPcPGgq73JHq9PTDg6yvFZY",
"created_at":"2023-11-17T04:24:33.458Z",
"amount_money":{
"amount":2600,
"currency":"USD"
},
"type":"CARD",
"card_details":{
"status":"CAPTURED",
"card":{
"card_brand":"VISA",
"last_4":"1606",
"exp_month":12,
"exp_year":2028,
"fingerprint":"sq-1-SKib6tYcQ16f1ga3-pEj4ARSoAUjgWdD_mM6228DFSKdYQ1B8Q21PPA3i5iVzw0cdw",
"card_type":"CREDIT",
"prepaid_type":"NOT_PREPAID",
"bin":"438857"
},
"entry_method":"ON_FILE"
},
"tip_money":{
"amount":260,
"currency":"USD"
},
"payment_id":"B4W9AgwsF4jDDYNkJOQwBVgzH98YY"
}
],
"total_service_charge_money":{
"amount":0,
"currency":"USD"
},
"net_amounts":{
"total_money":{
"amount":2600,
"currency":"USD"
},
"tax_money":{
"amount":0,
"currency":"USD"
},
"discount_money":{
"amount":260,
"currency":"USD"
},
"tip_money":{
"amount":260,
"currency":"USD"
},
"service_charge_money":{
"amount":0,
"currency":"USD"
}
},
"source":{
"name":"Square Online"
},
"net_amount_due_money":{
"amount":0,
"currency":"USD"
}
}
}
For hCvDesLdBpmQ/LRgQprfSbz6MByJ1xTAd7KdT4iXkVc
this is the order payload pulled at that time:
{
"order":{
"id":"tNGQNRAPcPGgq73JHq9PTDg6yvFZY",
"location_id":"LXE4FC194XMVZ",
"line_items":[
{
"uid":"NX4ZN19in1pAot0fvMmO8",
"catalog_object_id":"XOZHBXAROPXGWEI3YBRPWHZ4",
"catalog_version":1700174136440,
"quantity":"1",
"name":"Cherry Pie",
"variation_name":"9 inch",
"base_price_money":{
"amount":2600,
"currency":"USD"
},
"gross_sales_money":{
"amount":2600,
"currency":"USD"
},
"total_tax_money":{
"amount":0,
"currency":"USD"
},
"total_discount_money":{
"amount":260,
"currency":"USD"
},
"total_money":{
"amount":2340,
"currency":"USD"
},
"variation_total_price_money":{
"amount":2600,
"currency":"USD"
},
"applied_discounts":[
{
"uid":"mDkEL2vlV3clDY2LbEZlrC",
"discount_uid":"6556eb00b8a66",
"applied_money":{
"amount":260,
"currency":"USD"
}
}
],
"item_type":"ITEM",
"total_service_charge_money":{
"amount":0,
"currency":"USD"
}
}
],
"discounts":[
{
"uid":"6556eb00b8a66",
"name":"Discount: Coupon PIES23",
"amount_money":{
"amount":260,
"currency":"USD"
},
"applied_money":{
"amount":260,
"currency":"USD"
},
"type":"FIXED_AMOUNT",
"scope":"LINE_ITEM"
}
],
"fulfillments":[
{
"uid":"vyysEynWxh3FS4dn4ai8cD",
"type":"PICKUP",
"state":"PROPOSED",
"pickup_details":{
"pickup_at":"2023-11-23T20:00:00.000Z",
"note":"",
"placed_at":"2023-11-17T04:24:34.008Z",
"schedule_type":"SCHEDULED",
"recipient":{
"display_name":"Marilynn Tham",
"email_address":"[email protected]",
"phone_number":"+14156998542",
"address":{
"address_line_1":"1820 Solano Ave",
"locality":"Berkeley",
"administrative_district_level_1":"CA",
"postal_code":"94707",
"country":"US",
"organization":"Lavender Bakery & Cafe'"
}
},
"prep_time_duration":"PT0S"
},
"line_item_application":"ALL"
}
],
"created_at":"2023-11-17T04:24:32.844Z",
"updated_at":"2023-11-17T04:24:34.009Z",
"state":"OPEN",
"version":3,
"reference_id":"11ee850054142be8b9beac1f6bbba828",
"total_tax_money":{
"amount":0,
"currency":"USD"
},
"total_discount_money":{
"amount":260,
"currency":"USD"
},
"total_tip_money":{
"amount":260,
"currency":"USD"
},
"total_money":{
"amount":2600,
"currency":"USD"
},
"tenders":[
{
"id":"B4W9AgwsF4jDDYNkJOQwBVgzH98YY",
"location_id":"LXE4FC194XMVZ",
"transaction_id":"tNGQNRAPcPGgq73JHq9PTDg6yvFZY",
"created_at":"2023-11-17T04:24:33.458Z",
"amount_money":{
"amount":2600,
"currency":"USD"
},
"type":"CARD",
"card_details":{
"status":"CAPTURED",
"card":{
"card_brand":"VISA",
"last_4":"1606",
"exp_month":12,
"exp_year":2028,
"fingerprint":"sq-1-SKib6tYcQ16f1ga3-pEj4ARSoAUjgWdD_mM6228DFSKdYQ1B8Q21PPA3i5iVzw0cdw",
"card_type":"CREDIT",
"prepaid_type":"NOT_PREPAID",
"bin":"438857"
},
"entry_method":"ON_FILE"
},
"tip_money":{
"amount":260,
"currency":"USD"
},
"payment_id":"B4W9AgwsF4jDDYNkJOQwBVgzH98YY"
}
],
"total_service_charge_money":{
"amount":0,
"currency":"USD"
},
"net_amounts":{
"total_money":{
"amount":2600,
"currency":"USD"
},
"tax_money":{
"amount":0,
"currency":"USD"
},
"discount_money":{
"amount":260,
"currency":"USD"
},
"tip_money":{
"amount":260,
"currency":"USD"
},
"service_charge_money":{
"amount":0,
"currency":"USD"
}
},
"source":{
"name":"Square Online"
},
"net_amount_due_money":{
"amount":0,
"currency":"USD"
}
}
}