> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stash.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Shop Maintenance Mode

> Switch your web shop into and out of maintenance mode from your game server, and read its current state. Players see a maintenance screen instead of the shop until you switch it off.

When you need to close your web shop, for example while your game servers are down, switch it into maintenance mode from your game server. Players see the web shop's maintenance screen instead of the shop until you switch it off. They stay signed in.

## What players see and when

| Who | What happens | When |
| :- | :- | :- |
| A player opening the shop or signing in | Sees the maintenance screen | Within about 30 seconds of your call |
| A player with a shop page open | The page switches to the maintenance screen | Within about two minutes of your call |
| A player with the shop in a background tab, or on the "temporarily unavailable" screen | The page switches to the maintenance screen | When the page next reloads or is brought to the front |

The two-minute bound also covers a page that is still waiting to reload after an earlier [catalog refresh for every player](https://docs.stash.gg/guides/stash-webshop/catalog/real-time-catalog/caching.md#force-a-catalog-refresh).

When you switch maintenance mode off, players on the maintenance screen see the shop again when they reload the page or return to it.

> [!WARNING]
>
> Use maintenance mode to close the shop. A catalog refresh for every player refreshes the catalog but does not close the shop.

## Authenticate the request

Both endpoints are server-to-server and accept HMAC signatures only. Sign each request with your ingress secret in the `x-stash-hmac-signature` header, as described in [HMAC signing](https://docs.stash.gg/guides/get-started/stash-api-keys/overview.md#hmac-signing):

* For `POST`, sign the exact body bytes you send.
* For `GET`, sign an empty body: the signed string is `"<unixMillisTimestamp>."`.

The deprecated `X-Stash-Api-Key` header is not accepted on these endpoints. The call always applies to the web shop of the app named in the signature.

## Switch maintenance mode on or off

Call [Set maintenance mode](https://docs.stash.gg/api/ingress/web-shop/setmaintenancemode.md) (`POST /sdk/server/shop/maintenance`) with `enabled` set to `true` to switch it on, or `false` to switch it off.

```bash theme={null}
curl -X POST https://api.stash.gg/sdk/server/shop/maintenance \
  -H "Content-Type: application/json" \
  -H "x-stash-hmac-signature: v1;<appId>;<unixMillisTimestamp>;<base64-hmac>" \
  -d '{"enabled":true}'
```

Stash returns the resulting state. `since` is the time maintenance mode was switched on, in RFC 3339 format:

```json theme={null}
{ "enabled": true, "since": "2026-11-17T09:00:00Z" }
```

While maintenance mode is off, `since` is `null`:

```json theme={null}
{ "enabled": false, "since": null }
```

`enabled` is required. A request without it, including an empty body, `{}` or a misspelled field name, is refused with `400` and changes nothing.

The call is idempotent, so retries are safe:

* Switching on a shop that is already in maintenance mode succeeds and keeps the original `since`.
* Switching off a shop that is not in maintenance mode succeeds and changes nothing.

## Read the current state

Call [Get maintenance mode](https://docs.stash.gg/api/ingress/web-shop/getmaintenancemode.md) (`GET /sdk/server/shop/maintenance`). The response has the same shape as the one above.

## Call limits

Limits are counted per shop, in 60-second windows. Every authenticated call counts, including one refused with `400`.

| Endpoint | Calls per shop per 60 seconds |
| :- | :- |
| Set maintenance mode | 10 |
| Get maintenance mode | 60 |

Above the limit, Stash returns `429` with a `RetryInfo` detail whose `retryDelay` says how long to wait until the window ends, for example:

```json theme={null}
{ "@type": "type.googleapis.com/google.rpc.RetryInfo", "retryDelay": "60s" }
```

A maintenance window needs two calls: one to switch on and one to switch off. Retry with backoff and wait for `retryDelay` after a `429`; do not retry in a tight loop. If your server spends all 10 Set maintenance mode calls in a window, a call to switch maintenance mode off is refused until the window ends.

> [!NOTE]
>
> Web shop maintenance mode is separate from [launcher maintenance mode](https://docs.stash.gg/guides/stash-launcher/how-tos/launcher-maintenance-mode.md). Switching one does not affect the other.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.