Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Orders

  • Create order

  • Batch retrieve orders

  • Calculate order

  • Clone order

  • Search orders

  • Retrieve order

  • Update order

  • Pay order

  • Webhooks

  • order.created

  • order.fulfillment.updated

  • order.updated

<- Orders API

Orders API

All versions ->

Update orderBeta

PUT

 /v2/orders/{order_id}

Updates an open order by adding, replacing, or deleting fields.

Orders with a COMPLETED or CANCELED state cannot be updated.

An UpdateOrder request requires the following:

  • The order_id in the endpoint path, identifying the order to update.
  • The latest version of the order to update.
  • The sparse order containing only the fields to update and the version to which the update is being applied.
  • If deleting fields, the dot notation paths identifying the fields to clear.

To pay for an order, see Pay for Orders.

Permissions:ORDERS_WRITE

Guide

Update orders

Try in API Explorer
Link to section

Path parameters

Example code

Link to section

order_id

string

Required

The ID of the order to update.

Link to section

Request body

Link to section

order

The sparse order containing only the fields to update and the version to which the update is being applied.

Link to section

fields_to_clear

string [ ]

The dot notation paths fields to clear. For example, line_items[uid].note. For more information, see Deleting fields.

Link to section

idempotency_key

string

A value you specify that uniquely identifies this update request.

If you are unsure whether a particular update was applied to an order successfully, you can reattempt it with the same idempotency key without worrying about creating duplicate updates to the order. The latest order version is returned.

For more information, see Idempotency.

Max Length
192
Link to section

Response fields

Link to section

order

The updated order.

Link to section

errors

Any errors that occurred during the request.

Link to section

Examples

All versions ->

PUT /v2/orders/{order_id}
curl https://connect.squareup.com/v2/orders/DREk7wJcyXNHqULq8JJ2iPAsluJZY \ -X PUT \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "idempotency_key": "UNIQUE_STRING", "order": { "version": 1, "line_items": [ { "uid": "cookie_uid", "quantity": "2", "name": "COOKIE", "base_price_money": { "amount": 200, "currency": "USD" } } ] }, "fields_to_clear": [ "discounts" ] }'

Response JSON

{ "order": { "version": 2, "total_money": { "currency": "USD", "amount": 900 }, "source": { "name": "Cookies" }, "line_items": [ { "total_tax_money": { "currency": "USD", "amount": 0 }, "total_money": { "amount": 500, "currency": "USD" }, "gross_sales_money": { "amount": 500, "currency": "USD" }, "base_price_money": { "amount": 500, "currency": "USD" }, "quantity": "1", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "currency": "USD", "amount": 0 }, "name": "Small Coffee", "uid": "EuYkakhmu3ksHIds5Hiot", "variation_total_price_money": { "amount": 500, "currency": "USD" } }, { "total_money": { "amount": 400, "currency": "USD" }, "gross_sales_money": { "currency": "USD", "amount": 400 }, "total_tax_money": { "currency": "USD", "amount": 0 }, "variation_total_price_money": { "currency": "USD", "amount": 400 }, "name": "COOKIE", "uid": "cookie_uid", "base_price_money": { "amount": 200, "currency": "USD" }, "quantity": "2", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "total_discount_money": { "amount": 0, "currency": "USD" } } ], "state": "OPEN", "total_service_charge_money": { "amount": 0, "currency": "USD" }, "id": "DREk7wJcyXNHqULq8JJ2iPAsluJZY", "location_id": "MXVQSVNDGN3C8", "total_tax_money": { "amount": 0, "currency": "USD" }, "created_at": "2019-08-23T18:26:18.243Z", "total_discount_money": { "amount": 0, "currency": "USD" }, "net_amounts": { "service_charge_money": { "currency": "USD", "amount": 0 }, "total_money": { "amount": 900, "currency": "USD" }, "discount_money": { "currency": "USD", "amount": 0 }, "tax_money": { "currency": "USD", "amount": 0 } }, "updated_at": "2019-08-23T18:33:47.523Z" } }