---
id: updatefees
title: Update fees
hide_title: true
description: "Update Fees call for Walley Checkout API"
---

import Link from '@docusaurus/Link';
import Ingress from '../../../src/components/ingress/ingress.react';

<Ingress title="Update fees">
    The Update fees request will replace the current fees.
    If you update the fees while the Checkout is visible, use the <a href="/docs/checkout/optional/clientapi">Checkout Client API's</a> to invoke <code>suspend</code> before your operation and <code>resume</code> afterward.
</Ingress>

The fee is optional but will be shown last on the receipt after all the cart items if present and be presented separately on the thank you-page.

:::info
If the [Delivery Module](/docs/checkout/delivery/introduction-delivery-module) is used, the customer selects delivery method inside Walley Checkout and the `fees.shipping` object and this entire endpoint are obsolete.
:::

:::info Important
This operation is only available while the purchase is still in progress.
:::

While the checkout is suspended, the fees can be updated by calling the Checkout API from your backend:

```http
PUT /checkouts/{checkoutId}/fees HTTP/1.1
```

:::note[API Reference]
See **<Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/fees" data-noBrokenLinkCheck>Update fees</Link>** for the request schema, property descriptions, examples and error reasons.
:::

## Setting the shipping fee

To set the shipping fee, add a `shipping` object to the fees object of the request. The shipping object can be `null` to remove the shipping fee for the current Checkout.

Keep the combination of `id` and `description` unique within the Checkout session, cart articles included. That keeps every line distinct on the invoice and the receipt. Walley trims leading and trailing white-space from both values.

## Error responses

The error reasons this endpoint can return are listed per status code in the <Link to="/reference#tag/checkout/PUT/checkouts/{checkoutId}/fees" data-noBrokenLinkCheck>API Reference</Link>. The [Error codes](/docs/checkout/error-codes) page explains the HTTP status codes used across the Checkout API.
