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.
Order
Name | Type | Tags | Description |
---|---|---|---|
id |
String |
Optional | The order's unique ID. |
location_id |
String |
Required | The ID of the seller location that this order is associated with. Constraints: Minimum Length: 1 |
reference_id |
String |
Optional | A client-specified ID to associate an entity in another system with this order. Constraints: Maximum Length: 40 |
source |
Order Source Hash |
Optional | Represents the origination details of an order. |
customer_id |
String |
Optional | The ID of the customer associated with the order. IMPORTANT: You should specify a customer_id if you want the corresponding payment transactionsto be explicitly linked to the customer in the Seller Dashboard. If this field is omitted, the customer_id assigned to any underlying Payment objects is ignored and might result in thecreation of new instant profiles. Constraints: Maximum Length: 191 |
line_items |
Array<Order Line Item Hash> |
Optional | The line items included in the order. |
taxes |
Array<Order Line Item Tax Hash> |
Optional | 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, anOrderLineItemAppliedTax must be added to each line item that the tax applies to. For taxeswith 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 deprecatedline_items.taxes field results in an error. Use line_items.applied_taxes instead. |
discounts |
Array<Order Line Item Discount Hash> |
Optional | 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 deprecatedline_items.discounts field results in an error. Use line_items.applied_discounts instead. |
service_charges |
Array<Order Service Charge Hash> |
Optional | A list of service charges applied to the order. |
fulfillments |
Array<Order Fulfillment Hash> |
Optional | Details about order fulfillment. Orders can only be created with at most one fulfillment. However, orders returned by the API might contain multiple fulfillments. |
returns |
Array<Order Return Hash> |
Optional | 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 beingreferenced. |
return_amounts |
Order Money Amounts Hash |
Optional | A collection of various money amounts. |
net_amounts |
Order Money Amounts Hash |
Optional | A collection of various money amounts. |
rounding_adjustment |
Order Rounding Adjustment Hash |
Optional | A rounding adjustment of the money being returned. Commonly used to apply cash rounding when the minimum unit of the account is smaller than the lowest physical denomination of the currency. |
tenders |
Array<Tender Hash> |
Optional | The tenders that were used to pay for the order. |
refunds |
Array<Refund Hash> |
Optional | The refunds that are part of this order. |
metadata |
Hash of String |
Optional | 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 prefixedwith 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. |
created_at |
String |
Optional | The timestamp for when the order was created, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). |
updated_at |
String |
Optional | The timestamp for when the order was last updated, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). |
closed_at |
String |
Optional | The timestamp for when the order reached a terminal state, in RFC 3339 format (for example "2016-09-04T23:59:33.123Z"). |
state |
String (Order State) |
Optional | The state of the order. |
version |
Integer |
Optional | 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. |
total_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
total_tax_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
total_discount_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
total_tip_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
total_service_charge_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
ticket_name |
String |
Optional | A short-term identifier for the order (such as a customer first name, table number, or auto-generated order number that resets daily). For orders created in Square Point of Sale, the ticket_name isprinted on in-person tickets and stubs. It converts to the kitchen_printing.name field in thebill cart feature details. Constraints: Maximum Length: 30 |
pricing_options |
Order Pricing Options Hash |
Optional | 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. |
rewards |
Array<Order Reward Hash> |
Optional | A set-like list of Rewards that have been added to the Order. |
net_amount_due_money |
Money Hash |
Optional | Represents an amount of money. Money fields can be signed or unsigned.Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information. |
{
"id": null,
"location_id": "location_id4",
"reference_id": null,
"source": null,
"customer_id": null,
"line_items": null,
"taxes": null,
"discounts": null,
"service_charges": null,
"fulfillments": null,
"returns": null,
"return_amounts": null,
"net_amounts": null,
"rounding_adjustment": null,
"tenders": null,
"refunds": null,
"metadata": null,
"created_at": null,
"updated_at": null,
"closed_at": null,
"state": null,
"version": null,
"total_money": null,
"total_tax_money": null,
"total_discount_money": null,
"total_tip_money": null,
"total_service_charge_money": null,
"ticket_name": null,
"pricing_options": null,
"rewards": null,
"net_amount_due_money": null
}