The customer_id is gone in the orders-api

Hi @Bryan-Square, it was awesome we can get the information we needed thanks to you and your team, but now the customer_id is not coming up any more in our orders-api retrieval. Is that how it’s supposed to be? any advise about how to find the customer_id now? or how can we know the what customer is creating the order?

Hmm, what’s the order_id? :slightly_smiling_face:

Any order we retrieve now comes without customer_id, but now it comes with delivery details, so the only think we guess is that the customer_id was replaced with the delivery recipient details? but with no id we need to search Square customers-api to get it?
This is the id of a recent order without customer_id: BTck6U6Xe4G1PeyXrXgraLyYTMLZY

Doesn’t look like a customer_id was set for that order. :slightly_smiling_face:

What do you mean? there is a Recipient and a Contact look:

Delivery details

Recipient
Ali Sadeghi

Contact
510-610-8536

[email protected]
Location
Lavender Bakery & Cafe

Deliver to
Ali Sadeghi
6602 Hagen Boulevard
El Cerrito, CA 94530
United States

how can that order not have a customer_id set?
and also these other orders with the same customer:
1F21BHz1pDZQBYOWJThyiZ4PHcKZY
NFQvi9ycQspc514mThorrSCGh3dZY
9ZUmo5jTMkC1i28QyTpZFOK3IkPZY

@Bryan-Square, this order has a different customer Emma Whitson and also it has no customer_id, can you take a look at it? and if there is a reason for these orders to have no customer_id set? it’s very confusing for us?

order_id = BH2wsoXbRqERi0kTWSCX9hiAq3UZY

I just checked BH2wsoXbRqERi0kTWSCX9hiAq3UZY and it has a customer_id in it. In the order BTck6U6Xe4G1PeyXrXgraLyYTMLZY did they checkout differently or use a new card? :slightly_smiling_face:

@Bryan-Square, the issue happens randomly and is causing us some issues, so we have been monitoring when it happens and we found a pattern:

  • Delivery orders are the ones missing the customer_id.
  • The customer_id is missing in the webhook payload right when the payment is done.
  • If we retrieve the order some time later the customer_id comes up.
  • So, that is the reason because you see the customer_id and we don’t, because we see the payload right when the payment is done, but you see it days later.

So, to demonstrate the problem here are the payloads for 2 orders that we received without customer_id at first and later when it came up. We are sending you the these points for 2 of these orders we got without customerID below:

1st order_id
1st order payload WITHOUT customer_id
1st order payload WITH customer_id

2nd order_id
2nd order payload WITHOUT customer_id
2nd order payload WITH customer_id

You can compare the versions between both payloads, and hopefully you can do something so we can get the customer_id from the initial moment the webhook send us information as it works with Pickups. It’s important to mention again that Pickups work perfectly fine, and the issue affecting us is only for Deliveries:

1st order_id: phDrp7seGsc586D0MsHKsJJtieDZY
1st order payload WITHOUT customer_id:
{
“order”:{
“id”:“dPzQ0uMZLt6KAOFuabJHuddQTPTZY”,
“location_id”:“LXE4FC194XMVZ”,
“line_items”:[
{
“uid”:“CnRrqXU1ctjBtkNZYPWnUC”,
“catalog_object_id”:“5ZICMFM6G4WET7XYVE4AYAAG”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Apple Pie”,
“variation_name”:“8 inch”,
“base_price_money”:{
“amount”:2400,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:2400,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:2400,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:2400,
“currency”:“USD”},
“item_type”:“ITEM”},
{
“uid”:“ixGv2ARfg7gLNbpzTJqbn”,
“catalog_object_id”:“QKGI2HFXBRT7Q2K6QA3JZ5ET”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Chocolate Chip Cookie”,
“variation_name”:“Regular”,
“base_price_money”:{
“amount”:1450,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:1450,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:1450,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:1450,
“currency”:“USD”},
“item_type”:“ITEM”,
“quantity_unit”:{
“measurement_unit”:{
“weight_unit”:“IMPERIAL_POUND”,
“type”:“TYPE_WEIGHT”},
“precision”:3,
“catalog_object_id”:“YMMEDAIREJCFHKLE6OFB5OUA”,
“catalog_version”:1668968232679}}],
“fulfillments”:[
{
“uid”:“FZQjpIHaAF90aoJ5NNOv5”,
“type”:“DELIVERY”,
“state”:“PROPOSED”,
“line_item_application”:“ALL”,
“delivery_details”:{
“recipient”:{
“display_name”:“Customer Name”,
email_address":"[email protected]”,
“phone_number”:“7773334444”,
“address”:{
“address_line_1”:“3434 customer ave”,
“address_line_2”:“front house”,
“locality”:“Miami”,
“administrative_district_level_1”:“FL”,
“postal_code”:“33333”,
“country”:“US”}},
“schedule_type”:“ASAP”,
“placed_at”:“2022-11-23T02:14:40.843Z”,
“deliver_at”:“2022-11-25T00:00:00.000Z”,
“prep_time_duration”:“PT10M”,
“delivery_window_duration”:“PT10M”,
“note”:“Delivery By Doordash. Courier pickup time: 11/24/2022 3:09pm - 3:19pm. For issues, contact 1(855) 599-7066 and provide the following delivery ID: 1498725463.\nTotal Fees Applied: $21.27”,
“courier_pickup_at”:“2022-11-24T23:09:32.000Z”,
“is_no_contact_delivery”:false,
“dropoff_notes”:“”,
“courier_provider_name”:“Doordash”,
“courier_support_phone_number”:“1(855) 599-7066”,
“square_delivery_id”:“127i5yivuz58jw4hjwv3dzzle”,
“external_delivery_id”:“1498725463”}}],
“created_at”:“2022-11-23T02:14:39.368Z”,
“updated_at”:“2022-11-23T02:14:42.000Z”,
“state”:“OPEN”,
“version”:4,
“reference_id”:“11ed6ad3d3299dbf9f3bac1f6bbbcc9c”,
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_tip_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:5827,
“currency”:“USD”},
“tenders”:[
{
“id”:“35DKmBajUeHkcRqSm9YykhX4QL7YY”,
“location_id”:“LXE4FC194XMVZ”,
“transaction_id”:“dPzQ0uMZLt6KAOFuabJHuddQTPTZY”,
“created_at”:“2022-11-23T02:14:39Z”,
“amount_money”:{
“amount”:5827,
“currency”:“USD”},
“type”:“CARD”,
“card_details”:{
“status”:“CAPTURED”,
“card”:{
“card_brand”:“VISA”,
“last_4”:“9585”,
“fingerprint”:“sq-1-tnJWLtNnuHnG5x93zcNOmnzlkPObRghNts77rwFAr1CcKFzzBug3LKU2Tg64zkhBWA”},
“entry_method”:“KEYED”},
“payment_id”:“35DKmBajUeHkcRqSm9YykhX4QL7YY”}],
“service_charges”:[
{
“uid”:“gFeGS8LVhkaKFe94IvZRyC”,
“name”:“Delivery”,
“amount_money”:{
“amount”:1399,
“currency”:“USD”},
“applied_money”:{
“amount”:1399,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:1399,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”},
{
“uid”:“Wl3k9ChCB7tGKlNPPVX13B”,
“name”:“Courier Tip”,
“amount_money”:{
“amount”:578,
“currency”:“USD”},
“applied_money”:{
“amount”:578,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:578,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”}],
“total_service_charge_money”:{
“amount”:1977,
“currency”:“USD”},
“net_amounts”:{
“total_money”:{
“amount”:5827,
“currency”:“USD”},
“tax_money”:{
“amount”:0,
“currency”:“USD”},
“discount_money”:{
“amount”:0,
“currency”:“USD”},
“tip_money”:{
“amount”:0,
“currency”:“USD”},
“service_charge_money”:{
“amount”:1977,
“currency”:“USD”}},
“source”:{
“name”:“Square Online”},
“net_amount_due_money”:{
“amount”:0,
“currency”:“USD”}}

}

1st order payload WITH customer_id:
{

“order”:{
“id”:“dPzQ0uMZLt6KAOFuabJHuddQTPTZY”,
“location_id”:“LXE4FC194XMVZ”,
“line_items”:[
{
“uid”:“CnRrqXU1ctjBtkNZYPWnUC”,
“catalog_object_id”:“5ZICMFM6G4WET7XYVE4AYAAG”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Apple Pie”,
“variation_name”:“8 inch”,
“base_price_money”:{
“amount”:2400,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:2400,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:2400,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:2400,
“currency”:“USD”},
“item_type”:“ITEM”},
{
“uid”:“ixGv2ARfg7gLNbpzTJqbn”,
“catalog_object_id”:“QKGI2HFXBRT7Q2K6QA3JZ5ET”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Chocolate Chip Cookie”,
“variation_name”:“Regular”,
“base_price_money”:{
“amount”:1450,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:1450,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:1450,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:1450,
“currency”:“USD”},
“item_type”:“ITEM”,
“quantity_unit”:{
“measurement_unit”:{
“weight_unit”:“IMPERIAL_POUND”,
“type”:“TYPE_WEIGHT”},
“precision”:3,
“catalog_object_id”:“YMMEDAIREJCFHKLE6OFB5OUA”,
“catalog_version”:1668968232679}}],
“fulfillments”:[
{
“uid”:“FZQjpIHaAF90aoJ5NNOv5”,
“type”:“DELIVERY”,
“state”:“PROPOSED”,
“line_item_application”:“ALL”,
“delivery_details”:{
“recipient”:{
“display_name”:“Customer Name”,
email_address":"[email protected]”,
“phone_number”:“7773334444”,
“address”:{
“address_line_1”:“3434 customer ave”,
“address_line_2”:“front house”,
“locality”:“Miami”,
“administrative_district_level_1”:“FL”,
“postal_code”:“33333”,
“country”:“US”}},
“schedule_type”:“ASAP”,
“placed_at”:“2022-11-23T02:14:40.843Z”,
“deliver_at”:“2022-11-25T00:00:00.000Z”,
“prep_time_duration”:“PT10M”,
“delivery_window_duration”:“PT10M”,
“note”:“Delivery By Doordash. Courier pickup time: 11/24/2022 3:09pm - 3:19pm. For issues, contact 1(855) 599-7066 and provide the following delivery ID: 1498725463.\nTotal Fees Applied: $21.27”,
“courier_pickup_at”:“2022-11-24T23:09:32.000Z”,
“is_no_contact_delivery”:false,
“dropoff_notes”:“”,
“courier_provider_name”:“Doordash”,
“courier_support_phone_number”:“1(855) 599-7066”,
“square_delivery_id”:“127i5yivuz58jw4hjwv3dzzle”,
“external_delivery_id”:“1498725463”}}],
“created_at”:“2022-11-23T02:14:39.368Z”,
“updated_at”:“2022-11-23T03:39:52.658Z”,
“state”:“OPEN”,
“version”:6,
“reference_id”:“11ed6ad3d3299dbf9f3bac1f6bbbcc9c”,
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_tip_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:5827,
“currency”:“USD”},
“tenders”:[
{
“id”:“35DKmBajUeHkcRqSm9YykhX4QL7YY”,
“location_id”:“LXE4FC194XMVZ”,
“transaction_id”:“dPzQ0uMZLt6KAOFuabJHuddQTPTZY”,
“created_at”:“2022-11-23T02:14:39Z”,
“amount_money”:{
“amount”:5827,
“currency”:“USD”},
“type”:“CARD”,
“card_details”:{
“status”:“CAPTURED”,
“card”:{
“card_brand”:“VISA”,
“last_4”:“9585”,
“fingerprint”:“sq-1-tnJWLtNnuHnG5x93zcNOmnzlkPObRghNts77rwFAr1CcKFzzBug3LKU2Tg64zkhBWA”},
“entry_method”:“KEYED”},
“payment_id”:“35DKmBajUeHkcRqSm9YykhX4QL7YY”}],
“service_charges”:[
{
“uid”:“gFeGS8LVhkaKFe94IvZRyC”,
“name”:“Delivery”,
“amount_money”:{
“amount”:1399,
“currency”:“USD”},
“applied_money”:{
“amount”:1399,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:1399,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”},
{
“uid”:“Wl3k9ChCB7tGKlNPPVX13B”,
“name”:“Courier Tip”,
“amount_money”:{
“amount”:578,
“currency”:“USD”},
“applied_money”:{
“amount”:578,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:578,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”}],
“total_service_charge_money”:{
“amount”:1977,
“currency”:“USD”},
“net_amounts”:{
“total_money”:{
“amount”:5827,
“currency”:“USD”},
“tax_money”:{
“amount”:0,
“currency”:“USD”},
“discount_money”:{
“amount”:0,
“currency”:“USD”},
“tip_money”:{
“amount”:0,
“currency”:“USD”},
“service_charge_money”:{
“amount”:1977,
“currency”:“USD”}},
“source”:{
“name”:“Square Online”},
“customer_id”:“C51RQ41T3D4RQ7QJN4SA1XAQ9G”,
“net_amount_due_money”:{
“amount”:0,
“currency”:“USD”}}

}

2nd order_id: v26MuzX2JfWz7iLBrtQtYhIT4RfZY
2nd order payload WITHOUT customer_id:
{

“order”:{
“id”:“v26MuzX2JfWz7iLBrtQtYhIT4RfZY”,
“location_id”:“LXE4FC194XMVZ”,
“line_items”:[
{
“uid”:“TCEq1LDwjHPYZzMJFVrPQ”,
“catalog_object_id”:“IAJZ3ZNGAE5WG3OA4EAJF5WY”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Pumpkin 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”:0,
“currency”:“USD”},
“total_money”:{
“amount”:2600,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:2600,
“currency”:“USD”},
“item_type”:“ITEM”},
{
“uid”:“JUGVFfRKvAyA313s4tPCyB”,
“catalog_object_id”:“KKWTWAWFIORFG4PRDPYDENK4”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Frangipane Tart”,
“variation_name”:“Apple”,
“base_price_money”:{
“amount”:695,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:695,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:695,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:695,
“currency”:“USD”},
“item_type”:“ITEM”}],
“fulfillments”:[
{
“uid”:“jYnzCaPON6hcmkaySeltFD”,
“type”:“DELIVERY”,
“state”:“PROPOSED”,
“line_item_application”:“ALL”,
“delivery_details”:{
“recipient”:{
“display_name”:“Customer name”,
email_address":"[email protected]”,
“phone_number”:“7773334444”,
“address”:{
“address_line_1”:“3434 customer ave”,
“locality”:“Miami”,
“administrative_district_level_1”:“FL”,
“postal_code”:“33333”,
“country”:“US”}},
“schedule_type”:“ASAP”,
“placed_at”:“2022-11-23T14:53:05.312Z”,
“deliver_at”:“2022-11-24T18:00:00.000Z”,
“prep_time_duration”:“PT10M”,
“delivery_window_duration”:“PT10M”,
“note”:“Delivery By Doordash. Courier pickup time: 11/24/2022 9:32am - 9:42am. For issues, contact 1(855) 599-7066 and provide the following delivery ID: 1498832701.\nTotal Fees Applied: $18.73”,
“courier_pickup_at”:“2022-11-24T17:32:41.000Z”,
“is_no_contact_delivery”:false,
“dropoff_notes”:“”,
“courier_provider_name”:“Doordash”,
“courier_support_phone_number”:“1(855) 599-7066”,
“square_delivery_id”:“127i6l4p0r6ghaileknbcvs36”,
“external_delivery_id”:“1498832701”}}],
“created_at”:“2022-11-23T14:53:03.220Z”,
“updated_at”:“2022-11-23T14:53:06.000Z”,
“state”:“OPEN”,
“version”:4,
“reference_id”:“11ed6a80c0c6c1ac9f3bac1f6bbbcc9c”,
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_tip_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:5018,
“currency”:“USD”},
“tenders”:[
{
“id”:“ThqpLPzmpJDqN6TGMYrEJvrbD4UZY”,
“location_id”:“LXE4FC194XMVZ”,
“transaction_id”:“v26MuzX2JfWz7iLBrtQtYhIT4RfZY”,
“created_at”:“2022-11-23T14:53:03Z”,
“amount_money”:{
“amount”:5018,
“currency”:“USD”},
“type”:“CARD”,
“card_details”:{
“status”:“CAPTURED”,
“card”:{
“card_brand”:“VISA”,
“last_4”:“1673”,
“fingerprint”:“sq-1-Kd2h9Cvl7_hikxMN3dEXNMRWz6pbfvVr-Pg-FQip90bdtnia9PrbyOwT2PnSccg3cw”},
“entry_method”:“KEYED”},
“payment_id”:“ThqpLPzmpJDqN6TGMYrEJvrbD4UZY”}],
“service_charges”:[
{
“uid”:“DbotNghRktgaYaLW932E4C”,
“name”:“Delivery”,
“amount_money”:{
“amount”:899,
“currency”:“USD”},
“applied_money”:{
“amount”:899,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:899,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”},
{
“uid”:“AYdep1QOIEYBDnAn6vrImB”,
“name”:“Courier Tip”,
“amount_money”:{
“amount”:824,
“currency”:“USD”},
“applied_money”:{
“amount”:824,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:824,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”}],
“total_service_charge_money”:{
“amount”:1723,
“currency”:“USD”},
“net_amounts”:{
“total_money”:{
“amount”:5018,
“currency”:“USD”},
“tax_money”:{
“amount”:0,
“currency”:“USD”},
“discount_money”:{
“amount”:0,
“currency”:“USD”},
“tip_money”:{
“amount”:0,
“currency”:“USD”},
“service_charge_money”:{
“amount”:1723,
“currency”:“USD”}},
“source”:{
“name”:“Square Online”},
“net_amount_due_money”:{
“amount”:0,
“currency”:“USD”}}

}

2nd order payload WITH customer_id:
{

“order”:{
“id”:“v26MuzX2JfWz7iLBrtQtYhIT4RfZY”,
“location_id”:“LXE4FC194XMVZ”,
“line_items”:[
{
“uid”:“TCEq1LDwjHPYZzMJFVrPQ”,
“catalog_object_id”:“IAJZ3ZNGAE5WG3OA4EAJF5WY”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Pumpkin 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”:0,
“currency”:“USD”},
“total_money”:{
“amount”:2600,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:2600,
“currency”:“USD”},
“item_type”:“ITEM”},
{
“uid”:“JUGVFfRKvAyA313s4tPCyB”,
“catalog_object_id”:“KKWTWAWFIORFG4PRDPYDENK4”,
“catalog_version”:1668968232679,
“quantity”:“1”,
“name”:“Frangipane Tart”,
“variation_name”:“Apple”,
“base_price_money”:{
“amount”:695,
“currency”:“USD”},
“gross_sales_money”:{
“amount”:695,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:695,
“currency”:“USD”},
“variation_total_price_money”:{
“amount”:695,
“currency”:“USD”},
“item_type”:“ITEM”}],
“fulfillments”:[
{
“uid”:“jYnzCaPON6hcmkaySeltFD”,
“type”:“DELIVERY”,
“state”:“PROPOSED”,
“line_item_application”:“ALL”,
“delivery_details”:{
“recipient”:{
“display_name”:“Customer name”,
email_address":"[email protected]”,
“phone_number”:“7773334444”,
“address”:{
“address_line_1”:“3434 customer ave”,
“locality”:“Miami”,
“administrative_district_level_1”:“FL”,
“postal_code”:“33333”,
“country”:“US”}},
“schedule_type”:“ASAP”,
“placed_at”:“2022-11-23T14:53:05.312Z”,
“deliver_at”:“2022-11-24T18:00:00.000Z”,
“prep_time_duration”:“PT10M”,
“delivery_window_duration”:“PT10M”,
“note”:“Delivery By Doordash. Courier pickup time: 11/24/2022 9:32am - 9:42am. For issues, contact 1(855) 599-7066 and provide the following delivery ID: 1498832701.\nTotal Fees Applied: $18.73”,
“courier_pickup_at”:“2022-11-24T17:32:41.000Z”,
“is_no_contact_delivery”:false,
“dropoff_notes”:“”,
“courier_provider_name”:“Doordash”,
“courier_support_phone_number”:“1(855) 599-7066”,
“square_delivery_id”:“127i6l4p0r6ghaileknbcvs36”,
“external_delivery_id”:“1498832701”}}],
“created_at”:“2022-11-23T14:53:03.220Z”,
“updated_at”:“2022-11-23T16:20:02.754Z”,
“state”:“OPEN”,
“version”:6,
“reference_id”:“11ed6a80c0c6c1ac9f3bac1f6bbbcc9c”,
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“total_discount_money”:{
“amount”:0,
“currency”:“USD”},
“total_tip_money”:{
“amount”:0,
“currency”:“USD”},
“total_money”:{
“amount”:5018,
“currency”:“USD”},
“tenders”:[
{
“id”:“ThqpLPzmpJDqN6TGMYrEJvrbD4UZY”,
“location_id”:“LXE4FC194XMVZ”,
“transaction_id”:“v26MuzX2JfWz7iLBrtQtYhIT4RfZY”,
“created_at”:“2022-11-23T14:53:03Z”,
“amount_money”:{
“amount”:5018,
“currency”:“USD”},
“type”:“CARD”,
“card_details”:{
“status”:“CAPTURED”,
“card”:{
“card_brand”:“VISA”,
“last_4”:“1673”,
“fingerprint”:“sq-1-Kd2h9Cvl7_hikxMN3dEXNMRWz6pbfvVr-Pg-FQip90bdtnia9PrbyOwT2PnSccg3cw”},
“entry_method”:“KEYED”},
“payment_id”:“ThqpLPzmpJDqN6TGMYrEJvrbD4UZY”}],
“service_charges”:[
{
“uid”:“DbotNghRktgaYaLW932E4C”,
“name”:“Delivery”,
“amount_money”:{
“amount”:899,
“currency”:“USD”},
“applied_money”:{
“amount”:899,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:899,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”},
{
“uid”:“AYdep1QOIEYBDnAn6vrImB”,
“name”:“Courier Tip”,
“amount_money”:{
“amount”:824,
“currency”:“USD”},
“applied_money”:{
“amount”:824,
“currency”:“USD”},
“calculation_phase”:“SUBTOTAL_PHASE”,
“taxable”:false,
“total_money”:{
“amount”:824,
“currency”:“USD”},
“total_tax_money”:{
“amount”:0,
“currency”:“USD”},
“type”:“CUSTOM”}],
“total_service_charge_money”:{
“amount”:1723,
“currency”:“USD”},
“net_amounts”:{
“total_money”:{
“amount”:5018,
“currency”:“USD”},
“tax_money”:{
“amount”:0,
“currency”:“USD”},
“discount_money”:{
“amount”:0,
“currency”:“USD”},
“tip_money”:{
“amount”:0,
“currency”:“USD”},
“service_charge_money”:{
“amount”:1723,
“currency”:“USD”}},
“source”:{
“name”:“Square Online”},
“customer_id”:“DADDRB9FJH79H3CED44FX7GPVW”,
“net_amount_due_money”:{
“amount”:0,
“currency”:“USD”}}

}

I’m checking with the team but I believe this is the expected behavior. The customer_id may not be immediately available when the order is first created and due to some asynchronous functions the customer_id is added later. :slightly_smiling_face:

@Bryan-Square, I understand, but shouldn’t these erratic behaviors be explained in some basic level in the documentation? The problem is that us as developers estimate a time and budget for each project and when done, we start finding all these issues due to erratic behaviors that are not supposed to happen based on what is documented. I mean, if the documentation says that the customer_id is part of the response when an order is retrieved we as developers build the app to get it each time. When we start to find situations where the API behaves different to what is documented in different situations, the project itself starts to fail and it seems the application itself was not completed, but in reality it’s due to erratic behaviors missing in the documentation. Square is growing so fast and it seems there are not competitors at the same level, but building projects with Square APIs are very unreliable and it’s a huge toll when dealing with out customers. Is there some kind of ‘Known issues’ area, blog, site? Where we developers can explore those related to what we are building?

I’ll definitely pass this feedback to the team. We do try to document all the limitations in the Requirements and Limitations of each API. In our Customers API we do document the behavior:

  • Orders made from Square Online stores might not include a customer_id when retrieved from the Orders API, so you should not rely on this field for your integration. For more information about customer linking limitations with orders, Customer assignments for orders and payments .
    :slightly_smiling_face: