<- Object

Object

Order

Contains all information related to a single order to process with Square, including line items that specify the products to purchase.

Order objects also include information about any associated tenders, refunds, and returns.

All Connect V2 Transactions have all been converted to Orders including all associated itemization data.

Link to section

Properties

Link to section

id

string

Read only The order's unique ID.

Link to section

location_id

string

Required

The ID of the seller location that this order is associated with.

Link to section

reference_id

string

A client-specified ID to associate an entity in another system with this order.

Link to section

source

The origination details of the order.

Link to section

customer_id

string

Beta

The ID of the customer associated with the order.

You should specify a customer_id on the order (or the payment) to ensure that transactions are reliably linked to customers. Omitting this field might result in the creation of new instant profiles.

Link to section

line_items

The line items included in the order.

Link to section

taxes

The list of all taxes associated with the order.

Taxes can be scoped to either ORDER or LINE_ITEM. For taxes with LINE_ITEM scope, an OrderLineItemAppliedTax must be added to each line item that the tax applies to. For taxes with ORDER scope, the server generates an OrderLineItemAppliedTax for every line item.

On reads, each tax in the list includes the total amount of that tax applied to the order.

IMPORTANT: If LINE_ITEM scope is set on any taxes in this field, using the deprecated line_items.taxes field results in an error. Use line_items.applied_taxes instead.

Link to section

discounts

The list of all discounts associated with the order.

Discounts can be scoped to either ORDER or LINE_ITEM. For discounts scoped to LINE_ITEM, an OrderLineItemAppliedDiscount must be added to each line item that the discount applies to. For discounts with ORDER scope, the server generates an OrderLineItemAppliedDiscount for every line item.

IMPORTANT: If LINE_ITEM scope is set on any discounts in this field, using the deprecated line_items.discounts field results in an error. Use line_items.applied_discounts instead.

Link to section

service_charges

A list of service charges applied to the order.

Link to section

fulfillments

Details about order fulfillment.

Orders can only be created with at most one fulfillment. However, orders returned by the API might contain multiple fulfillments.

Link to section

returns

Beta

Read only A collection of items from sale orders being returned in this one. Normally part of an itemized return or exchange. There is exactly one Return object per sale Order being referenced.

Link to section

return_amounts

Beta

Read only The rollup of the returned money amounts.

Link to section

net_amounts

Beta

Read only The net money amounts (sale money - return money).

Link to section

rounding_adjustment

Beta

Read only A positive rounding adjustment to the total of the order. This adjustment is commonly used to apply cash rounding when the minimum unit of account is smaller than the lowest physical denomination of the currency.

Link to section

tenders

Beta

Read only The tenders that were used to pay for the order.

Link to section

refunds

Beta

Read only The refunds that are part of this order.

Link to section

metadata

Map<string, string>

Beta

Application-defined data attached to this order. Metadata fields are intended to store descriptive references or associations with an entity in another system or store brief information about the object. Square does not process this field; it only stores and returns it in relevant API calls. Do not use metadata to store any sensitive information (such as personally identifiable information or card details).

Keys written by applications must be 60 characters or less and must be in the character set [a-zA-Z0-9_-]. Entries can also include metadata generated by Square. These keys are prefixed with a namespace, separated from the key with a ':' character.

Values have a maximum length of 255 characters.

An application can have up to 10 entries per metadata field.

Entries written by applications are private and can only be read or modified by the same application.

For more information, see Metadata.

Link to section

created_at

string

Read only The timestamp for when the order was created, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

updated_at

string

Read only The timestamp for when the order was last updated, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

closed_at

string

Read only The timestamp for when the order reached a terminal state, in RFC 3339 format (for example "2016-09-04T23:59:33.123Z").

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

state

string

The current state of the order.

Link to section

version

integer(32-bit)

Beta

The version number, which is incremented each time an update is committed to the order. Orders not created through the API do not include a version number and therefore cannot be updated.

Read more about working with versions.

Link to section

total_money

Read only The total amount of money to collect for the order.

Link to section

total_tax_money

Read only The total amount of tax money to collect for the order.

Link to section

total_discount_money

Read only The total amount of discount money to collect for the order.

Link to section

total_tip_money

Read only The total amount of tip money to collect for the order.

Link to section

total_service_charge_money

Read only The total amount of money collected in service charges for the order.

Note: total_service_charge_money is the sum of applied_money fields for each individual service charge. Therefore, total_service_charge_money only includes inclusive tax amounts, not additive tax amounts.

Link to section

ticket_name

string

Beta

A short-term identifier for the order (such as a customer first name, table number, or auto-generated order number that resets daily).

Link to section

pricing_options

Pricing options for an order. The options affect how the order's price is calculated. They can be used, for example, to apply automatic price adjustments that are based on preconfigured pricing rules.

Link to section

rewards

Beta

Read only A set-like list of Rewards that have been added to the Order.

Link to section

net_amount_due_money

Read only The net amount of money due on the order.