Hello, I am trying to retrieve order details using webhooks in my web application. When a user checks out with a Square URL this data is sent to my server:
==============================
ORDER HAS BEEN CREATED
Full order created body:
{
merchant_id: 'QMQ16MVGWH93N',
type: 'order.created',
event_id: 'c164463c-92d5-33ca-9818-06da863a7f72',
created_at: '2023-04-26T17:48:15Z',
data: {
type: 'order',
id: 'qvlZ3QTByCtNJ471bOr2NJbpQaSZY',
object: { order_created: [Object] }
}
}
order obj body:
{
created_at: '2023-04-26T17:48:14.975Z',
location_id: '3WRDA0JSAPRV7',
order_id: 'qvlZ3QTByCtNJ471bOr2NJbpQaSZY',
state: 'OPEN',
version: 1
}
==============================
This is good, but I want to get what the customer actually ordered. I believe in the Orders API it’s called ‘line items’. I am subscribed to the order.created event. I am looking for what the customer ordered, quantity, etc…