---
title: "Update an order"
method: PUT
path: "/orders/{order_id}"
tags: ["Orders"]
---

# Update an order

`PUT /orders/{order_id}`

## Request

- Base URL: `https://app-sandbox.resolvepay.com/api`
- URL: `https://app-sandbox.resolvepay.com/api/orders/{order_id}`
- Auth: one of:
  - HTTP bearer
  - HTTP basic
- TypeScript: <https://skmtc.dev/resolvepay/apis/resolve-partners-api-reference/docs/orders/:order_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update an authorized order's amount, order number, PO number, or line items. At least one field must be provided. Only orders in the `authorized` status can be updated.

## Path parameters

- `order_id` string, required

## Request body

- OrderUpdateRequest
  - `amount` number, double: Updated authorization amount in USD.
  - `order_number` string: Updated order number.
  - `po_number` string, nullable: Updated purchase order number.
  - `line_items` OrderLineItem[]: Updated line items for the order.
    - `name` string: Name or description of the line item.
    - `quantity` number: Quantity of units.
    - `unit_price` number, double: Price per unit in USD.
    - `sku` string: SKU or product identifier.
    - `total_price` number, double: Total price for this line item in USD. Defaults to unit_price × quantity if omitted.
    - `type` string: Line item type. Common values: `product`, `shipping`, `subtotal`.
    - `tax_amount` number, double: Tax amount for this line item in USD.

## Response `200`

An object representing an order.

- Order
  - `id` string: Unique identifier for the order.
  - `merchant_id` string: ID of the sub-merchant this order belongs to.
  - `checkout_id` string, nullable: ID of the checkout session that produced this order when a buyer authorized it through the sub-merchant's Checkout SDK. `null` for orders created through the API.
  - `number` string, nullable: Order number identifier.
  - `po_number` string, nullable: Purchase order number associated with the order.
  - `advance_requested` boolean: Whether the order is placed on net terms against the customer's credit line.
  - `source` string: Channel that created the order, for example `checkout` for Checkout SDK orders or `api` for orders created through the API.
  - `status` 'authorized' | 'partially_captured' | 'fully_captured' | 'canceled': Current status of the order.
  - `amount_authorized` number, double: Total authorized amount for the order in USD.
  - `amount_captured` number, double: Total captured amount for the order in USD.
  - `amount_canceled` number, double: Total canceled amount for the order in USD.
  - `amount_remaining` number, double: Remaining authorized amount available for capture in USD.
  - `first_captured_at` string, date-time, nullable: Timestamp of the first capture event.
  - `line_items` OrderLineItem[], nullable: Line items associated with the order.
    - `name` string: Name or description of the line item.
    - `quantity` number: Quantity of units.
    - `unit_price` number, double: Price per unit in USD.
    - `sku` string: SKU or product identifier.
    - `total_price` number, double: Total price for this line item in USD. Defaults to unit_price × quantity if omitted.
    - `type` string: Line item type. Common values: `product`, `shipping`, `subtotal`.
    - `tax_amount` number, double: Tax amount for this line item in USD.
  - `authorization_expires_at` string, date-time, nullable: Timestamp when the authorization expires.
  - `authorization_expiry_source` string, nullable: Source that determined the authorization expiry.
  - `authorized_at` string, date-time: Timestamp when the order was authorized.
  - `updated_at` string, date-time: Timestamp when the order was last updated.
  - `customer` OrderCustomer
    - `id` string: Unique identifier of the customer.
    - `name` string: Business name of the customer.
    - `remaining_credit` number, double: Remaining available credit for the customer in USD.
  - `capture_events` OrderCaptureEvent[]: Capture events for this order. Present on single-order responses; omitted from list results.
    - `amount` number, double: Amount captured in this capture event in USD.
    - `idempotency_key` string: Idempotency key used for this capture.
    - `processed_at` string, date-time: Timestamp when this capture was processed.
    - `invoice_id` string: ID of the sub-merchant's invoice created by this capture.

## Other responses

- `400`: Bad request error
- `401`: Unauthorized error
- `403`: Forbidden error
- `404`: Not found error
- `429`: Rate limit error

---

[API](https://skmtc.dev/resolvepay/apis/resolve-partners-api-reference.md) - [All operations](https://skmtc.dev/resolvepay/apis/resolve-partners-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/resolvepay/apis/resolve-partners-api-reference/revisions/5a1c75b8b404?raw)
