---
id: updateorderreference
title: Update order reference
hide_title: true
description: "Update order reference call for Walley Checkout"
---

import Link from '@docusaurus/Link';
import Ingress from '../../../src/components/ingress/ingress.react';

<Ingress title="Update Order Reference">
    In addition to update an order reference in the initialize checkout and order validation calls, 
    it is also possible to update the order reference for a Checkout session after a purchase has been successfully completed
</Ingress>

:::info Important
You can only update the Order Reference once after the purchase has been completed, and it must be done before the order is captured.
:::

The order reference is updated by calling the Checkout API from your backend:

```http
PUT /checkouts/{checkoutId}/reference HTTP/1.1
```

:::note[API Reference]
See **<Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/reference" data-noBrokenLinkCheck>Update order reference</Link>** for the request schema, examples and error reasons.
:::

## The reference value

This is a reference to the order, like an order ID. If you update the reference after completing the purchase, the customer might not see it. However, you can still match it with the PurchaseIdentifier the customer sees.

## Error responses

The error reasons this endpoint can return are listed per status code in the <Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/reference" data-noBrokenLinkCheck>API Reference</Link>. The [Error codes](/docs/checkout/error-codes) page explains the HTTP status codes used across the Checkout API.
