<!-- canonical: https://docs.costplus.io/api-reference/orders/updateOrder -->

> Update the properties of an existing order.
# Update an order

Update the properties of an existing order.

## Endpoint

```
PUT /orders/{id}
```

## Authentication

HTTP Basic — use your API key as the username with an empty password.

```bash
curl -u YOUR_API_KEY: https://api.costplus.online/v1/orders/{id}/
```

## Parameters

| In | Name | Type | Required | Description |
|---|---|---|---|---|
| path | `id` | string | yes | Order identifier |

## Request body

Content-Type: `application/json` (required)

Fields:

- `id` — string. Order identifier
- `project_id` — string. Project identifier
- `merchant_id` — string. Merchant identifier used to create the order
- `order_url` — string. The order URL if available
- `refund_of_order_id` — string. Order ID of the original order, if this is a refund
- `refund_orders` — array. Order IDs of related refund orders
- `refunded_amount` — integer. Amount refunded on this order
- `chargeback_of_order_id` — string. Order ID of the original order, if this is a chargeback
- `chargeback_orders` — array. Order IDs of related chargeback orders
- `reversal_of_order_id` — string. Order ID of the original order, if this is a reversal
- `reversal_orders` — array. Order IDs of related reversal orders
- `related_order_id` — string. Order ID of the original order
- `related_orders` — array. Order IDs of related orders
- `related_payment_link_id` — string. ID of the related payment link
- `merchant_order_id` — string,null. Merchant's internal order identifier
- `merchant_bulk_id` — string,null. Merchant bulk ID (for grouping transactions for payouts)
- `merchant_name` — string,null. Merchant name (for payouts)
- `merchant_iban` — string,null. Merchant IBAN (for payouts)
- `merchant_bic` — string,null. Merchant BIC (for payouts)
- `created` — string. Creation timestamp (ISO 8601)
- `modified` — string,null. Last modified timestamp (ISO 8601)
- `completed` — string,null. Completion timestamp (ISO 8601)
- `expiration_period` — string,null. Order expiration interval (ISO 8601 duration, e.g. PT30M)
- `capture_mode` — string. Capture mode. `delayed` requires `expiration_period`.
- `currency` — string (required). ISO 4217 currency code
- `amount` — integer (required). Order amount in minor units (e.g. cents), including VAT
- `description` — string. Order description
- `status` — string. Current order status
- `flags` — array. Order flags
- `locale` — string,null. Language for the hosted payment page. Supported: `en-GB`, `de-DE`, `nl-NL`, `nl-BE`, `fr-BE`, `sv-SE`, `no-NO`, `da-DK`
- `payment_methods` — array. Filter available payment methods for this order. Omit to show all enabled methods, or pass a single value to restrict to one method. To offer multiple specific methods, use the `transactions` array instead (one entry per method).
- `transactions` — array. Collection of transactions
- `return_url` — string,null. URL to redirect the customer after a successful or non-failure payment. Acts as the default redirect for all statuses when `failure_url` is not provided.
- `failure_url` — string,null. URL to redirect the customer when the order status is `cancelled`, `expired`, or `error`. Only used when both `return_url` and `failure_url` are provided.
- `webhook_url` — string. URL for status change notifications
- `order_lines` — array. Order line items
- `customer` — object. Customer details
- `client` — object. Client integration details
- `extra` — object. Free-form data stored with the order

## Responses

### 200 — The updated order

### 401 — Invalid or missing API key

### 403 — No authorization for the requested resource

## cURL

```bash
curl -u YOUR_API_KEY: \
  -X PUT https://api.costplus.online/v1/orders/4851e31c-4137-4e91-95ef-1df945ee76a2/ \
  -H 'Content-Type: application/json' \
  -d '{ "description": "Updated description" }'
```
