Orders.created API

Hi @cyops welcome to the forums!

It looks like you have a few questions, so I’ll try to address them in order below:

  1. Order webhooks will only be sent for orders created explicitly by the API (CreateOrder endpoint). Other orders, like creating them through the Square POS, will not trigger a webhook.
  2. All orders will have an order_id (and furthermore, all payments will have an order even if you do not explicitly create one). The order.created webhook has the id in data->id.
  3. You’re right; the webhook doesn’t contain the full Order object so you’ll need to retrieve the order first. You can use SearchOrders to filter by fulfillment_type, although I don’t believe DELIVERY is a valid type. Currently, only Square Online (Weebly) supports delivery orders, but the public API does not unfortunately. If you are creating delivery orders through Weebly, then it may be possible for DELIVERY to work as a query parameter, but it’s not formally documented just to point out.

Please let me know if you have additional questions or concerns!