Address information missing in the RetrieveOrder response

When we receive the order.create webhook we need to retrieve the delivery information hitting RetrieveOrder endpoint. The endpoint is working fine but the delivery address is missing for RESTAURANT_DELIVERY orders. It is causing all orders an injection failure.

Example:

{
  "id": "j2Db4NXOlohVNakqxEBnHOdtReHZY",
  "location_id": "LKBKVJSYAV25G",
  "reference_id": "11ee67938153d8cbaf423cecef6dbaf0",
  "source": {
    "name": "Square Online"
  },
  "customer_id": "MQGHJ20R3D04F9BFEJYC5PAZD8",
  "line_items": [
    {
      "uid": "yXNWfQ0HvFZsfY2tNKCRTB",
      "name": "Chicken Tikka",
      "quantity": "1",
      "catalog_object_id": "ECNV7UNFJDOAFYPJNZYLZS5K",
      "variation_name": "",
      "base_price_money": {
        "amount": 950,
        "currency": "GBP"
      },
      "variation_total_price_money": {
        "amount": 950,
        "currency": "GBP"
      },
      "gross_sales_money": {
        "amount": 950,
        "currency": "GBP"
      },
      "total_tax_money": {
        "amount": 0,
        "currency": "GBP"
      },
      "total_discount_money": {
        "amount": 0,
        "currency": "GBP"
      },
      "total_money": {
        "amount": 950,
        "currency": "GBP"
      }
    },
    {
      "uid": "ILYkEgKgzXOmPGpiqLw7C",
      "name": "Paneer Tikka Shashlik",
      "quantity": "1",
      "catalog_object_id": "O4ZWPIXLGJYDUI6VQVFNTVUY",
      "variation_name": "",
      "base_price_money": {
        "amount": 850,
        "currency": "GBP"
      },
      "variation_total_price_money": {
        "amount": 850,
        "currency": "GBP"
      },
      "gross_sales_money": {
        "amount": 850,
        "currency": "GBP"
      },
      "total_tax_money": {
        "amount": 0,
        "currency": "GBP"
      },
      "total_discount_money": {
        "amount": 0,
        "currency": "GBP"
      },
      "total_money": {
        "amount": 850,
        "currency": "GBP"
      }
    }
  ],
  "fulfillments": [
    {
      "uid": "LF3GpLL0Z3713e6bZriHbD",
      "type": "DELIVERY",
      "state": "PROPOSED"
    }
  ],
  "net_amounts": {
    "total_money": {
      "amount": 1800,
      "currency": "GBP"
    },
    "tax_money": {
      "amount": 0,
      "currency": "GBP"
    },
    "discount_money": {
      "amount": 0,
      "currency": "GBP"
    },
    "tip_money": {
      "amount": 0,
      "currency": "GBP"
    },
    "service_charge_money": {
      "amount": 0,
      "currency": "GBP"
    }
  },
  "tenders": [
    {
      "id": "ZKbWqJRmIutJgl0W2UTMUcgcTZ6YY",
      "location_id": "LKBKVJSYAV25G",
      "transaction_id": "j2Db4NXOlohVNakqxEBnHOdtReHZY",
      "created_at": "2023-10-10T17:37:48.635Z",
      "amount_money": {
        "amount": 1800,
        "currency": "GBP"
      },
      "type": "CARD",
      "card_details": {
        "status": "CAPTURED",
        "card": {
          "card_brand": "MASTERCARD",
          "last_4": "2040",
          "exp_month": 7,
          "exp_year": 2026,
          "fingerprint": "sq-1-7rw3fvLFp5DlfkTZZRp0Cr6SHC6suhbNkVl8rvf4-9v2bK517cXKn04JfcfVCnW85w",
          "card_type": "DEBIT",
          "prepaid_type": "NOT_PREPAID",
          "bin": "537416"
        },
        "entry_method": "KEYED"
      },
      "payment_id": "ZKbWqJRmIutJgl0W2UTMUcgcTZ6YY"
    }
  ],
  "created_at": "2023-10-10T17:37:48.187Z",
  "updated_at": "2023-10-10T17:37:50.197Z",
  "state": "OPEN",
  "version": 3,
  "total_money": {
    "amount": 1800,
    "currency": "GBP"
  },
  "total_tax_money": {
    "amount": 0,
    "currency": "GBP"
  },
  "total_discount_money": {
    "amount": 0,
    "currency": "GBP"
  },
  "total_tip_money": {
    "amount": 0,
    "currency": "GBP"
  },
  "total_service_charge_money": {
    "amount": 0,
    "currency": "GBP"
  }
}

The delivery address can be different then the address that’s on file in the customer profile. Which is why the address lives in delivery_details of the order. You’ll want to call RetrieveOrder to get the address. :slightly_smiling_face:

Thank you Bryan.

In stead of receiving an order webhook notification and later polling for retrieving the rest of the information, is there a way we can subscribe to an order event where we receive already the totality of the order payload? (Items, custumer info, delivery info…)

For every event, hitting 2 endpoints for every order is creating problems.

Thanks

Oh, from what I see, the payload we are getting is already the one we get when we call RetrieveOrder

Could you please solve the buggy solution where we don’t receive the address?

Have you been approved to use the DELIVERY fulfillment type? This is a closed Beta. Request Beta access by completing the participation survey.

Beta access to the DELIVERY fulfillment type is for use cases other than performing deliveries on behalf of sellers. Developers seeking to perform deliveries on behalf of sellers need a formal partnership agreement. To become an app partner, submit a partnership request. :slightly_smiling_face: