---
id: updatemetadata
title: Update metadata
hide_title: true
description: "Update metadata call for Walley Checkout API"
---

import Link from '@docusaurus/Link';
import Ingress from '../../../src/components/ingress/ingress.react';

<Ingress title="Update metadata">
    The Update metadata request will replace the current metadata.
</Ingress>

:::info Important
This operation is only available while the purchase is still in progress.
:::

The metadata can be updated by calling the Checkout API from your backend:

```http
PUT /checkouts/{checkoutId}/metadata HTTP/1.1
```

:::note[API Reference]
See **<Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/metadata" data-noBrokenLinkCheck>Update metadata</Link>** for the request schema, examples and error reasons.
:::

## Metadata body

Each key in the object must be a string but the value can be any valid JSON value. Key casing is preserved. Providing an empty body will remove any existing metadata.

## Error responses

The error reasons this endpoint can return are listed per status code in the <Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/metadata" data-noBrokenLinkCheck>API Reference</Link>. The [Error codes](/docs/checkout/error-codes) page explains the HTTP status codes used across the Checkout API.
