---
title: "Update order"
method: POST
path: "/v2/orders/{token}"
tags: ["Orders"]
---

# Update order

`POST /v2/orders/{token}`

Update an order by changing the `merchantReference`. Use this endpoint when specifying the `merchantReference` during order creation was not possible.

## Path parameters

- `token` string, string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `merchantReference` string — Merchant reference for tracking the order in your system. Omit the field to remove the value.
  - `merchantProcessorReference` string — Merchant processor reference for tracking the order in your system.

## Response `200`

Order updated successfully

- object
  - `token` string, required — The order token that was updated.
  - `merchantReference` string — The updated merchant reference, returned if provided in the request.
  - `merchantProcessorReference` string — The updated merchant processor reference, returned if provided in the request.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `409` — Conflict

---

[API](https://skmtc.net/scalapay/apis/scalapay-api.md) · [All operations](https://skmtc.net/scalapay/apis/scalapay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scalapay/scalapay-api/versions/c43238b80cb9/schema)
