Skip to content

Square: V1 Update Order

Square v1Transactions.v1UpdateOrder: arguments, response, policy and SDK examples.

← V1 transactions operations · Get started

Operation square.v1updateorder

Provider route: PUT /v1/{location_id}/orders/{order_id}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["v1Transactions"]["v1UpdateOrder"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.v1Transactions.v1UpdateOrder(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_square import SquareIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.v1_transactions.v1_update_order(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.location_idstringRequired within parent
path.order_idstringRequired within parent
bodyModelRequired within parentExpand V1 Update Order — request body — body

Referenced models: V1 Update Order — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand V1 Update Order — response body

Referenced models: V1 Update Order — response body

7 more schemas are linked from the tables above, on the schema pages.

V1 Update Order — response body
FieldTypePresenceDescription and constraints
$objectRootV1Order
btc_price_satoshiJSONOptional
btc_price_satoshi (anyOf 1)JSONAlternative
btc_price_satoshi (anyOf 1) (anyOf 1)numberAlternativeFor Bitcoin transactions, the price of the buyer's order in satoshi (100 million satoshi equals 1 BTC).
btc_price_satoshi (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
btc_price_satoshi (anyOf 2)nullAlternative
btc_receive_addressJSONOptional
btc_receive_address (anyOf 1)stringAlternativeFor Bitcoin transactions, the address that the buyer sent Bitcoin to.
btc_receive_address (anyOf 2)nullAlternative
buyer_emailJSONOptional
buyer_email (anyOf 1)stringAlternativeThe email address of the order's buyer.
buyer_email (anyOf 2)nullAlternative
buyer_noteJSONOptional
buyer_note (anyOf 1)stringAlternativeA note provided by the buyer when the order was created, if any.
buyer_note (anyOf 2)nullAlternative
canceled_noteJSONOptional
canceled_note (anyOf 1)stringAlternativeA note provided by the merchant when the order's state was set to CANCELED, if any.
canceled_note (anyOf 2)nullAlternative
completed_noteJSONOptional
completed_note (anyOf 1)stringAlternativeA note provided by the merchant when the order's state was set to COMPLETED, if any
completed_note (anyOf 2)nullAlternative
created_atstringOptionalThe time when the order was created, in ISO 8601 format.
errorsJSONOptional
errors (anyOf 1)arrayAlternativeAny errors that occurred during the request.
errors (anyOf 1)[]ModelEach itemExpand Get Shift — response body — errors item
errors (anyOf 2)nullAlternative
expires_atJSONOptional
expires_at (anyOf 1)stringAlternativeThe time when the order expires if no action is taken, in ISO 8601 format.
expires_at (anyOf 2)nullAlternative
idstringOptionalThe order's unique identifier.
order_historyJSONOptional
order_history (anyOf 1)arrayAlternativeThe history of actions associated with the order.
order_history (anyOf 1)[]ModelEach itemExpand V1 Update Order — response body — order history The history of actions associated with the order item
order_history (anyOf 2)nullAlternative
payment_idJSONOptional
payment_id (anyOf 1)stringAlternativeThe unique identifier of the payment associated with the order.
payment_id (anyOf 2)nullAlternative
promo_codeJSONOptional
promo_code (anyOf 1)stringAlternativeThe promo code provided by the buyer, if any.
promo_code (anyOf 2)nullAlternative
recipient_nameJSONOptional
recipient_name (anyOf 1)stringAlternativeThe name of the order's buyer.
recipient_name (anyOf 2)nullAlternative
recipient_phone_numberJSONOptional
recipient_phone_number (anyOf 1)stringAlternativeThe phone number to use for the order's delivery.
recipient_phone_number (anyOf 2)nullAlternative
refunded_noteJSONOptional
refunded_note (anyOf 1)stringAlternativeA note provided by the merchant when the order's state was set to REFUNDED, if any.
refunded_note (anyOf 2)nullAlternative
shipping_addressJSONOptional
shipping_address (anyOf 1)ModelAlternativeExpand Get Payment — response body — payment billing address
The address to ship the order to.
shipping_address (anyOf 2)nullAlternative
stateJSONOptional
state (anyOf 1)stringAlternativeWhether the tax is an ADDITIVE tax or an INCLUSIVE tax.
See [V1OrderState](#type-v1orderstate) for possible values
Known values: PENDING, OPEN, COMPLETED, CANCELED, REFUNDED, REJECTED
state (anyOf 2)nullAlternative
subtotal_moneyJSONOptional
subtotal_money (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — subtotal money amount, currency code
The amount of all items purchased in the order, before taxes and shipping.
subtotal_money (anyOf 2)nullAlternative
tenderJSONOptional
tender (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — tender card brand, change back money, employee id, entry method, id, is exchange, name, pan suffix, payment note, receipt url, refunded money, settled at, tendered at, tendered money, total money, type
The tender used to pay for the order.
tender (anyOf 2)nullAlternative
total_discount_moneyJSONOptional
total_discount_money (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — subtotal money amount, currency code
The total of all discounts applied to the order.
total_discount_money (anyOf 2)nullAlternative
total_price_moneyJSONOptional
total_price_money (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — subtotal money amount, currency code
The total cost of the order.
total_price_money (anyOf 2)nullAlternative
total_shipping_moneyJSONOptional
total_shipping_money (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — subtotal money amount, currency code
The shipping cost for the order.
total_shipping_money (anyOf 2)nullAlternative
total_tax_moneyJSONOptional
total_tax_money (anyOf 1)ModelAlternativeExpand V1 Update Order — response body — subtotal money amount, currency code
The total of all taxes applied to the order.
total_tax_money (anyOf 2)nullAlternative
updated_atstringOptionalThe time when the order was last modified, in ISO 8601 format.

Referenced models: Get Payment — response body — payment billing address, Get Shift — response body — errors item, V1 Update Order — response body — subtotal money amount, currency code, V1 Update Order — response body — order history The history of actions associated with the order item, V1 Update Order — response body — tender card brand, change back money, employee id, entry method, id, is exchange, name, pan suffix, payment note, receipt url, refunded money, settled at, tendered at, tendered money, total money, type

V1 Update Order — request body — body
FieldTypePresenceDescription and constraints
$objectRootV1UpdateOrderRequest
actionstringRequired within parentThe action to perform on the order (COMPLETE, CANCEL, or REFUND).
See [V1UpdateOrderRequestAction](#type-v1updateorderrequestaction) for possible values
One of: COMPLETE, CANCEL, REFUND
canceled_noteJSONOptional
canceled_note (anyOf 1)stringAlternativeA merchant-specified note about the canceling of the order. Only valid if action is CANCEL.
canceled_note (anyOf 2)nullAlternative
completed_noteJSONOptional
completed_note (anyOf 1)stringAlternativeA merchant-specified note about the completion of the order. Only valid if action is COMPLETE.
completed_note (anyOf 2)nullAlternative
refunded_noteJSONOptional
refunded_note (anyOf 1)stringAlternativeA merchant-specified note about the refunding of the order. Only valid if action is REFUND.
refunded_note (anyOf 2)nullAlternative
shipped_tracking_numberJSONOptional
shipped_tracking_number (anyOf 1)stringAlternativeThe tracking number of the shipment associated with the order. Only valid if action is COMPLETE.
shipped_tracking_number (anyOf 2)nullAlternative
Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
categorystringRequired within parentIndicates which high-level category of error has occurred during a
request to the Connect API.
The high-level category for the error.
See [ErrorCategory](#type-errorcategory) for possible values
Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe name of the field provided in the original request (if any) that
the error pertains to.

Referenced models: Get Shift — response body — errors item code

SDK function policy ID: square.v1updateorder. Catalog operation: V1UpdateOrder. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["ORDERS_WRITE"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.